Giter Club home page Giter Club logo

zip-info's Introduction

zip-info

Usage: zi [-j | -p] [--exclude=<glob>] <path> ...
       zi --help
zi presents information about Zip archives.
Common options:
    -h, --help         Show this usage message.
    -j, --json         Structure the output in JSON
    -p, --pretty-json  Structure the output in easy-to-read JSON
    --exclude=<glob>   Ignore objects in the archives whose name
                       is like this glob pattern.

How to set up your development environment

  1. Make sure you are on nightly. One of the crates we use in this project uses a feature flag and will not compile on stable. The easiest way to do this is rustup install nightly.
  2. rustup default nightly and then cargo build
  3. You should be able to run targets/debug/zi now.
  4. (Bonus) You can set up VS Code with the Rust Language Server and GDB for a full IDE experience. See the following section for detailed instructions.

Rust Language Server for an IDE experience using Visual Studio Code

  • You will need to be on nightly to install the Rust Language Server (RLS). Specific directions for this can be found here.
  • You will need to install this VS Code extension.
  • I had to add the following configuration in my user settings to help the VS Code extension find my RLS installation. This worked on my Fedora 26 machine, but your mileage will vary depending on how your rustup and operating system are set up.
    "rust.rls": {
            "executable": "rustup",
            "args": ["run", "nightly", "rls"]
        }
    
  • You should see a status indicator in the bottom left-hand corner of VS Code with something along the lines of RLS: Analysis finished.

Setting up GDB debugging with the VS Code extension

  • Since OS X ditched gdb for LLDB, you will need to install GDB if you want to use this VS Code extension on a Mac. (Source)
  • Install this plugin. (The gdb target settings in launch.json are already defined for you inside the .vscode folder, so you should see a green play arrow with the target name Debug already ready for you when you open the Debugging pane in VS Code.)
  • There are Rust GDB pretty-printing scripts that are already loaded in the etc folder of this repository, straight from the Rust distribution, since we cannot call rust-gdb from our VS Code extension (and Windows installations will automatically omit these files, so we will have to end up manually copying them over anyway to debug on Windows). These pretty-printers will be loaded by the .gdbinit in the root directory of this repository.
  • On my Fedora machine, I had a problem with this project's .gdbinit not loading properly until it was whitelisted in the .gdbinit in my home directory. In that home directory .gdbinit, I had to add this following bit to whitelist this project's .gdbinit:
    add-auto-load-safe-path <PATH_TO_THIS_REPO_FOLDER>
    
    (You can also whitelist all .gdbinit on your system by adding the bit add-auto-load-safe-path /.)

zip-info's People

Contributors

rowedonalde avatar aaronshim avatar

Watchers

James Cloos avatar  avatar

Forkers

aaronshim

zip-info's Issues

Convert from binary crate to library crate

ZIp-Info would be able to leverage more Cargo features (like integration tests) and would be accessible to other applications as a library crate.

  • Depends on #8
  • Change zip-info.rs to lib.rs
  • Add integration tests

JSON output

zi should be able to output in JSON, both in a stream and pretty print.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.