24 releases

0.11.3 May 31, 2024
0.11.2 Mar 8, 2024
0.11.0 Jul 17, 2023
0.8.0 Mar 29, 2023
0.0.1 Jun 3, 2021

#39 in Programming languages

Download history 4391/week @ 2024-07-31 3932/week @ 2024-08-07 4002/week @ 2024-08-14 3631/week @ 2024-08-21 3786/week @ 2024-08-28 3554/week @ 2024-09-04 4640/week @ 2024-09-11 3751/week @ 2024-09-18 3148/week @ 2024-09-25 3644/week @ 2024-10-02 3625/week @ 2024-10-09 3380/week @ 2024-10-16 4919/week @ 2024-10-23 3629/week @ 2024-10-30 2617/week @ 2024-11-06 2556/week @ 2024-11-13

14,722 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

320KB
7.5K SLoC

tree-sitter-graph

DOI

The tree-sitter-graph library defines a DSL for constructing arbitrary graph structures from source code that has been parsed using tree-sitter.

Usage

This package can be used either as a library or command-line program.

To use it as a library, add the following to your Cargo.toml:

[dependencies]
tree-sitter-graph = "0.11"

To use it as a program, install it via cargo install:

$ cargo install --features cli tree-sitter-graph
$ tree-sitter-graph --help

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.

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

$ cargo fmt

Dependencies

~5–14MB
~173K SLoC