The `tree-sitter generate` command also produces a full description of the grammar itself (typically written to src/grammar.json). In theory you could use this to generate each grammar implementation in other languages, as well. No one has tackled this yet, though, because in practice it has worked well enough to FFI in the C parser implementations.
Also, depending on what language you're trying to consume tree-sitter parsers in, we're trying to leverage the language's package ecosystem as much as we can to simplify this process. If you're using Rust, for instance, we publish crates for tree-sitter itself [1] and for various language grammars [2,3,4]. So you can often just add some dependencies to your Cargo.toml and the Rust build system takes care of everything for you. (Note that these crates also provide a more Rust-idiomatic API, instead of making you call the FFI'ed C functions directly.)
[1] https://crates.io/crates/tree-sitter
[2] https://crates.io/crates/tree-sitter-python
The only issue I’ve come up with so far is a very distinct lack of ARM(64) support in precompiled binaries for FOSS-projects using tree-sitter.
One risks having to manually set up rust and build it yourself on your ARM-host (if your host is capable of that and your host-environment allows it), because currently there’s no easy way to cross-compile it, despite being largely rust-based:
https://github.com/tree-sitter/tree-sitter/issues/1366
It’s literally the only thing I have not working on in my otherwise very portable Emacs-setup when deployed on an ARM host, so for me it kinda stands out.
[0] https://github.com/siraben/dotfiles/blob/a0f49781ecb05693908...