8 releases (5 breaking)

0.6.0 Jan 13, 2023
0.5.1 Jan 10, 2023
0.4.1 Oct 19, 2022
0.3.1 Sep 7, 2022
0.1.0 May 9, 2022

#235 in Data structures

Download history 534/week @ 2022-12-02 586/week @ 2022-12-09 438/week @ 2022-12-16 76/week @ 2022-12-23 260/week @ 2022-12-30 364/week @ 2023-01-06 93/week @ 2023-01-13 217/week @ 2023-01-20 309/week @ 2023-01-27 30/week @ 2023-02-03 41/week @ 2023-02-10 50/week @ 2023-02-17 7/week @ 2023-02-24 36/week @ 2023-03-03 47/week @ 2023-03-10 37/week @ 2023-03-17

131 downloads per month
Used in 2 crates

MIT/Apache

1MB
12K SLoC

tree-sitter-stack-graphs

The tree-sitter-stack-graphs crate lets you create stack graphs using the tree-sitter grammar for a language.

Usage

To use this library, add the following to your Cargo.toml:

[dependencies]
tree-sitter-stack-graphs = "0.6"

Check out our documentation for more details on how to use this library.

Command-line Program

The command-line program for tree-sitter-stack-graphs lets you do stack graph based analysis and lookup from the command line.

Install the program using cargo install as follows:

$ cargo install --features cli tree-sitter-stack-graphs
$ tree-sitter-stack-graphs --help

Alternatively, the program can be invoked via NPM as follows:

$ npx tree-sitter-stack-graphs

Check out our examples for more details on how to work with the CLI.

Development

The project is written in Rust, and requires a recent version installed. Rust can be installed and updated using rustup.

Build the project by running:

$ cargo build

Run the tests by running:

$ cargo test

The project consists of a library and a CLI. By default, running cargo only applies to the library. To run cargo commands on the CLI as well, add --features cli or --all-features.

Run the CLI from source as follows:

$ cargo run --features cli -- ARGS

Sources are formatted using the standard Rust formatted, which is applied by running:

$ cargo fmt

License

Licensed under either of

at your option.

Dependencies

~6–13MB
~253K SLoC