mrkeyoor.com_
Sat 26 Sept 03:41 UTC
Dev Toolsevaluationupdated 26 Aug 2026

tree-sitter review

Tree-sitter is a parser generator and incremental parsing library for tools that need a syntax tree while code is being edited. It lets editors, analyzers, search tools, and refactoring systems update only the affected parts of a parse and still return a useful tree around syntax errors.

+48stars / 7d
Verdict

Our Tree-sitter build finished in 60 seconds, but 266 of 305 tests failed in 9 seconds with no cause visible in the supplied log tail. The architecture remains a strong fit for editors and structural code tools, and the current release and binding ecosystem show mature adoption. Pin the CLI, binding, grammar, and parser ABI together, then require a clean suite for the exact combination before shipping it.

We ran it

Lab card: what happened when we ran tree-sitterScreenshot of tree-sitter (tree-sitter.github.io)
Install✓ · 13s187 packages
Build✓ · 60s
Tests✗ · 9s39 passed · 266 failed of 305 (cargo test)
Repo620 files~100,299 lines of source · 4.3 MB · 14 CI workflows · Dockerfile · tests dir

Answers from our run

Does tree-sitter build from source?

Dependencies installed in 13 seconds (187 packages), and the build succeeded in 60 seconds. We cloned commit 74b7d0c into a clean Debian container with 3 CPUs and no project-specific setup.

Do tree-sitter's tests pass?

Not all of them: 39 of 305 passed and 266 failed when we ran the project's own test command (cargo test). Some failures need services or credentials a bare container does not have.

Who should not use tree-sitter?

Teams that need semantic analysis, type checking, or code generation out of the box: Tree-sitter produces concrete syntax trees, not a complete compiler frontend.

What are the alternatives to tree-sitter?

ANTLR 4, Ohm, Chevrotain. Our Tree-sitter build finished in 60 seconds, but 266 of 305 tests failed in 9 seconds with no cause visible in the supplied log tail.

Setup2/5Fast install and build, but 266 of 305 measured tests failed
Docs4/5Strong grammar, CLI, Rust, and Wasm guides beyond the short README
Community5/526,758 stars with same-day August 2026 releases and issue work
Maturity4/5Widely used architecture, with ABI and third-party grammar boundaries

Discussed on

  1. hnTree-sitter: an incremental parsing system for programming tools476 points
  2. hnHow to write a linter using tree-sitter in an hour270 points
  3. hnTree-sitter vs. Language Servers266 points
  4. hnHow to Get Started with Tree-Sitter243 points
  5. hnTree Sitter and the Complications of Parsing Languages225 points

Who it’s for

Editor and IDE developers who need syntax trees to update after each edit.
Tool authors building structural search, navigation, highlighting, or code analysis.
Language maintainers prepared to define and test a grammar in JavaScript.
Applications that can use the C runtime directly or one of the documented language bindings.

Who it’s NOT for

Teams that need semantic analysis, type checking, or code generation out of the box: Tree-sitter produces concrete syntax trees, not a complete compiler frontend.
Grammar authors without Node.js and a C or C++ compiler: the CLI docs require both for generation and parser testing.
Browser projects unwilling to manage separate runtime and grammar Wasm files: the web binding documents asset-location and parser-ABI compatibility requirements.
Applications loading arbitrary third-party native grammars without a trust policy: issue 5888 notes that generated parsers run as static libraries inside the host process.
Buyers who require the checked-out Rust suite to pass in a clean container: our run ended with 266 failures out of 305 tests, and the log tail did not state the cause.

Setup reality

Our sandbox installed 187 Rust packages in 13 seconds and built commit 74b7d0c in 60 seconds. Tests failed after 9 seconds: Cargo reported 39 passed and 266 failed out of 305. The supplied tail listed failing tree and cursor tests but contained no underlying error message.

Using an existing grammar can be a small library integration. Authoring one needs the Tree-sitter CLI, a JavaScript runtime for grammar.js, and a C or C++ compiler to run generated parsers. Browser use also needs the core Wasm file and a compatible language Wasm file.

The runtime is C, the main contributor toolchain is Rust, and bindings live across several repositories. Version compatibility covers the library, CLI, generated parser ABI, grammar package, and host binding, so pinning only one package is insufficient.

Incremental trees suit editors better than batch parsers

Tree-sitter builds a concrete syntax tree from source text and can reuse a previous tree after an edit. The caller describes the changed byte and row-column ranges, edits the old tree, and parses the new text with that tree as a reference. Tools can then update highlighting, navigation, structural selection, or queries without reparsing unrelated regions from scratch. The parser is also designed to return useful structure when the source contains errors.

This is syntax infrastructure, not a whole language service. Tree-sitter does not supply type inference, name resolution, lint rules, or a compiler backend. Those systems can consume its nodes, but the tool author owns their semantics and invalidation. That division is healthy for editors and code search, where a stable partial tree is useful before a program compiles. A compiler project may prefer a generator built around its later semantic phases.

Grammar development needs JavaScript and a native compiler

A grammar author installs the CLI, initializes a tree-sitter-<language> project, writes grammar.js, generates C code, and tests example files. The CLI can come from a release binary, Cargo, or npm. Although the tree-sitter binary itself has no runtime dependencies, generation requires a JavaScript runtime and parser testing requires a C or C++ compiler. The generated C parser can then be embedded through the runtime library or a binding.

The official documentation lists bindings for Rust, Python, JavaScript, Go, Java, Kotlin, Swift, Zig, Haskell, C#, and Wasm, with more maintained elsewhere. It warns that some third-party bindings may be incomplete or outdated. Language grammars are also separate packages with their own maintainers and releases. Adopting Tree-sitter therefore means selecting a binding and grammar, not merely adding the core repository.

What happened when we ran it

Our sandbox cloned commit 74b7d0c into a fresh unprivileged Debian container with 3 CPUs and 12 GB of RAM. The checkout contained 620 files, about 100,299 lines of source, and occupied 4.3 MB. Cargo installed 187 packages in 13 seconds, and the Rust build succeeded in 60 seconds. The repository had 14 CI workflow files, a Dockerfile, and a tests directory.

The test step failed with exit code 101 after 9 seconds. Cargo reported 39 passed and 266 failed out of 305, with none ignored, measured, or filtered out. The tail named failures across tree cursors, edits, aliases, included ranges, and scanner-token reuse. It did not include assertion messages, panics, missing files, or another cause, so the only defensible finding is that this checkout's detected suite failed broadly in our stated environment.

A 60-second successful build does not offset 266 failing tests. Before using this commit, rerun the suite with complete output and compare the required toolchain with upstream CI. Our summary cannot tell whether one setup fault caused many cases or whether the failures are independent. That diagnosis would require logs the measurement block does not provide.

Wasm deployment adds files and ABI coordination

The web binding ships JavaScript plus a core tree-sitter.wasm runtime. Each language arrives as another Wasm file. Bundlers may need an explicit copy step or locateFile callback so the runtime asset is served from the expected URL. A working JavaScript import can still fail later if the Wasm file is absent, served with the wrong path, or incompatible with the grammar.

Parser ABI versions create another boundary. The web documentation says recent releases accept a defined range of grammar ABIs and warns that some older prebuilt Wasm grammars use an unsupported dynamic-linking format even when their parser ABI appears acceptable. Rebuilding with a current CLI is the advised route. Pinning web-tree-sitter without pinning each grammar artifact leaves a deployment exposed to quiet incompatibility.

Native grammars belong inside the application's trust boundary

Generated parsers are compiled code loaded into the host process. Issue 5888 asks for sandboxing because editor distributions may bundle many grammars from unrelated maintainers. The issue does not demonstrate malicious parser code, but its trust argument is sound: a grammar artifact has the privileges and failure impact of native code inside the editor unless the application isolates it. Source review or reproducible builds can reduce that risk.

Issue 5807 reports several C-library functions recursing once per tree nesting level and shows a deeply nested input overflowing the stack in one path. The report names versions and real files with thousands of nesting levels. Tools parsing untrusted or generated input should fuzz their chosen grammar, cap resource use where possible, and decide whether a parser crash can take down the whole host process.

Release activity is current, while combinations still need testing

Version 0.26.13 was published on August 23, 2026. It fixed query handling, case-insensitive generation, error-node width, Rust binding behavior, and CI workspace coverage, while updating Wasmtime. GitHub recorded a push on August 26, 26,758 stars, and 100 combined open issues and pull requests. Current work covered parser generation, Wasm dependencies, query memory, grammar behavior, and sandboxing.

Tree-sitter is the default shortlist choice for an editor that needs incremental concrete trees. Its focused runtime and wide grammar ecosystem are hard to replace. The integration unit is a tested set of versions across the core, binding, CLI, and grammar. Given our 39-to-266 result, that exact set should pass locally before the parser becomes a foundation for user-facing tooling.

Alternatives

ProjectWhat it isPick it when
ANTLR 4A mature parser generator with grammar tooling and targets for many languages.pick this instead when compiler-style parsing and broad generated-language targets matter more than editor-focused incremental updates.
OhmA JavaScript toolkit for defining grammars and separate semantic operations.pick this instead when a JavaScript-native grammar system and readable language experiments are the main need.
ChevrotainA parser-building toolkit implemented for JavaScript and TypeScript applications.pick this instead when the parser belongs entirely in a JavaScript stack and you do not need Tree-sitter's native incremental runtime.

What people are saying

  1. [github-trending] tree-sitter/tree-sitter

Sources

  1. Tree-sitter README
  2. Tree-sitter documentation
  3. Tree-sitter v0.26.13 release
  4. Tree-sitter issue 5888
  5. Tree-sitter issue 5807

More dev tools reviews

microservices-demo · Claude-Code-Usage-Monitor · pyxel · dust · kubernetes-the-hard-way · wifit3 · the whole board →