Open tv42 opened 2 weeks ago
I think it should be possible to define Cargo features for the crate, and then get build.rs to set env variables for the C compilation based on the enabled features.
Building with different extensions requires the Tree-sitter CLI and Node.js.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
Using tree-sitter-md crate directly as a Rust library is pleasant and enables binaries that don't depend on global system state like installed helper binaries. That's promising and great.
However, enabling extensions via compile-time environment variables is just not viable;
cargo build && EXTENSION_TAGS=1 cargo build
does not magically trigger a rebuild of dependencies with the feature enabled.How should I use the tree-sitter-md crate if I need to parse tags?
Steps To Reproduce/Bad Parse Tree
n/a
Expected Behavior/Parse Tree
n/a
Repro
No response