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.
36 lines
1 KiB
TOML
36 lines
1 KiB
TOML
[package]
|
|
name = "tree-sitter-loader"
|
|
version.workspace = true
|
|
description = "Locates, builds, and loads tree-sitter grammars at runtime"
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
readme = "README.md"
|
|
homepage.workspace = true
|
|
repository.workspace = true
|
|
license.workspace = true
|
|
keywords.workspace = true
|
|
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
|
|
cc.workspace = true
|
|
dirs.workspace = true
|
|
fs4.workspace = true
|
|
indoc.workspace = true
|
|
libloading.workspace = true
|
|
once_cell.workspace = true
|
|
regex.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tempfile.workspace = true
|
|
|
|
tree-sitter = {workspace = true}
|
|
tree-sitter-highlight = {workspace = true, optional = true}
|
|
tree-sitter-tags = {workspace = true, optional = true}
|