| Crates.io | tsdl |
| lib.rs | tsdl |
| version | 1.5.0 |
| created_at | 2024-09-01 15:30:00.718865+00 |
| updated_at | 2025-04-08 09:14:05.68329+00 |
| description | A downloader/builder of many tree-sitter parsers |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1359716 |
| size | 192,859 |
A downloader/builder of many tree-sitter parsers
To build parsers (.so/.dylib) and use them with your favourite bindings.
I created it more specifically for the ruby bindings.
You can either grab the binary for your platform from
tsdl's releases
or install via cargo:
cargo install tsdl
To build a parser:
tsdl build rust
To build many parsers:
tsdl build rust ruby json
If a configuration file (parsers.toml) is provided, then simply running:
tsdl build
will download all the pinned parsers.
If no configuration is provided for the language you're asking for in parsers.toml,
the latest parsers will be downloaded built.
If you wish to pin parser versions:
[parsers]
java = "v0.21.0"
json = "0.21.0" # The leading v is not necessary
python = "master"
typescript = { ref = "0.21.0", cmd = "make" }
cobol = { ref = "6a469068cacb5e3955bb16ad8dfff0dd792883c9", from = "https://github.com/yutaro-sakamoto/tree-sitter-cobol" }
Run:
tsdl config default
to get the default config used by tsdl in TOML.
[!IMPORTANT] All configuration you can pass to
tsd buildcan be put in theparsers.toml, liketree-sitter-version,out-dir, etc.build-dir = "/tmp/tsdl" out-dir = "/usr/local/lib" [parsers] json = "0.21.0" # The leading v is not necessary rust = "master"
[!IMPORTANT] All configuration specified in
parsers.tomlcan be overridden with flags passed totsdl, i.e.:tsdl build --build-dir "/tmp/tsdl"will override whatever value is the default oftsdlor inparsers.toml.
[!TIP] Check out Faveod/tree-sitter-parsers for an example configuration.