tree-sitter.tree-sitter/crates/loader
Will Lillis b53ddd3d54 perf(loader): extract name from grammar.json without regex
We have to pay the cost of compiling the regex at runtime, and the
`LazyLock` overhead for each access. The pattern is simple enough that
we can manually parse and extract.

`grammar_json_name` is now ~116x faster on cold start, ~5.6x faster warm
(after the regex has been compiled). Both are fast enough to not matter
much in practice, but some perf gains and eliminating global state is a
win.
2026-03-31 01:23:15 -04:00
..
src perf(loader): extract name from grammar.json without regex 2026-03-31 01:23:15 -04:00
binaryen-version build(deps): bump binaryen to v127 2026-03-13 15:31:37 -04:00
build.rs Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496) 2025-06-06 14:25:37 -07:00
Cargo.toml fix(rust): remove unused dependencies from loader and lib 2026-03-02 09:14:28 +01:00
emscripten-version chore: upgrade emscripten to 4.0.15 2025-09-21 16:28:08 -04:00
LICENSE chore: copy license to all packages 2025-09-11 03:12:35 -04:00
README.md Reorganize rust crates into a flat crates directory, simplify some CI steps (#4496) 2025-06-06 14:25:37 -07:00
wasi-sdk-version build(deps): bump wasi-sdk to v32 2026-03-13 15:31:37 -04:00

Tree-sitter Loader

The tree-sitter command-line program will dynamically find and build grammars at runtime, if you have cloned the grammars' repositories to your local filesystem. This helper crate implements that logic, so that you can use it in your own program analysis tools, as well.