Tech News
← Back to articles

Show HN: I ported Tree-sitter to Go

read original related products more articles

gotreesitter

Pure-Go tree-sitter runtime — no CGo, no C toolchain, WASM-ready.

go get github.com/odvcencio/gotreesitter

Implements the same parse-table format tree-sitter uses, so existing grammars work without recompilation. Outperforms the CGo binding on every workload — incremental edits (the dominant operation in editors and language servers) are 90x faster than the C implementation.

Why Not CGo?

Every existing Go tree-sitter binding requires CGo. That means:

Cross-compilation breaks ( GOOS=wasip1 , GOARCH=arm64 from Linux, Windows without MSYS2)

, from Linux, Windows without MSYS2) CI pipelines need a C toolchain in every build image

go install fails for end users without gcc

fails for end users without Race detector, fuzzing, and coverage tools work poorly across the CGo boundary

... continue reading