Should we shell out to tree-sitter build
to build grammar libraries?
#829
Labels
question
Further information is requested
tree-sitter build
to build grammar libraries?
#829
In
topiary-config/src/language.rs
, we have this:topiary/topiary-config/src/language.rs
Lines 251 to 351 in 76456f2
This was a hard slog by @ErinvanderVeen to work out the correct compiler flags for Linux and macOS.
Interestingly, dynamic loading of grammars works on Windows. However, it only seems to work if the grammars are built with
tree-sitter build
; I (quite unsurprisingly) cannot get it to fly by switching to a GNU toolchain and hoping for the best! FWIW,tree-sitter build
is doing something similar to us:https://github.com/tree-sitter/tree-sitter/blob/3a85d4d5f3559bb0b25382b987c419b13983a630/cli/loader/src/lib.rs#L806-L881
This is part of
tree-sitter-loader
(specificallyLoader::compile_parser_at_path
), so we might not even need to shell out.I believe this would give us full platform support without having to work it out ourselves.
The text was updated successfully, but these errors were encountered: