Getting started
Installation
Unidep might (hopefully) support a large number of programming languages. The default installation installs everything, but it is also possible to specify the languages you are interested in to keep dependencies manageable.
Default installation
The default installation will install all currently supported languages. You can use unidep:
- as a CLI binary:
cargo install unidep
- as a Rust library, in your
Cargo.toml
:[dependencies] unidep = "0.1.0"
Custom installation
To install only a selected subset of languages (see the list of currently supported languages):
cargo install unidep --no-default-features --features "python,rust"
Or, if you plan to use unidep as a library:
[dependencies]
unidep = { version = "0.1.0", default-features = false, features = ["python", "rust"]}
Currently supported languages
python
rust
If your favorite language is missing, feel free to contribute.
Quick start
The quick start provides information for the CLI app only. Library users need to refer to the library chapter.
To get a png/svg graph of the dependencies within your project:
unidep src # will be saved in a default png file
unidep src -o deps.png # you can specify the output file with -o
unidep src -o deps.svg # unidep will infer the image format
If you prefer having a DOT file, or a JSON file:
unidep src --output-format dot # will be printed to stdout
unidep src --output-format json -o deps.json
You can build the dependency graph starting from one or more specific files:
unidep src/main.c src/another.c --include "src"
# Build dependencies of main.c and another.c and visit relevant files within the src directory
You can also look at dependencies at a function level:
unidep src/main.c --function --include "src"
To review all the possibilites of unidep as a binary program, see the using unidep as a CLI app section.