build(loader): make dependencies optional (#1638)
The `tree-sitter-loader` crate currently always pulls `tree-sitter-highlight` and `tree-sitter-tags` as dependencies. However, apart from the tree-sitter CLI, most clients will not need both of these libraries. This commit makes the dependencies optional, but still includes them by default in order not to break the backward compatibility.
This commit is contained in:
parent
76456919ae
commit
1c7b518b9d
2 changed files with 51 additions and 13 deletions
|
|
@ -14,6 +14,9 @@ categories.workspace = true
|
|||
|
||||
[features]
|
||||
wasm = ["tree-sitter/wasm"]
|
||||
# TODO: For backward compatibility these must be enabled by default,
|
||||
# consider removing for the next semver incompatible release
|
||||
default = ["tree-sitter-highlight", "tree-sitter-tags"]
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
|
|
@ -28,6 +31,6 @@ serde.workspace = true
|
|||
serde_json.workspace = true
|
||||
tempfile.workspace = true
|
||||
|
||||
tree-sitter.workspace = true
|
||||
tree-sitter-highlight.workspace = true
|
||||
tree-sitter-tags.workspace = true
|
||||
tree-sitter = {workspace = true}
|
||||
tree-sitter-highlight = {workspace = true, optional = true}
|
||||
tree-sitter-tags = {workspace = true, optional = true}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue