tree-sitter.tree-sitter/lib/Cargo.toml
Max Brunsfeld 43623ec9bf
Upgrade to latest wasmtime, improve robustness and perf of wasm-based parsing (#5847)
* build(deps): upgrade wasmtime C API to 48.0.0

Upgrade the Rust and Zig Wasmtime dependencies and enable reference values with the null GC collector.

Wasmtime 48 requires a newer Rust toolchain, whose Clippy version identifies three item helpers that can be const. Mark them const so the workspace continues to pass Clippy with warnings denied.

* feat(benchmark): support Wasm grammars

* perf(wasm): cache language function handles

* fix(wasm): improve validation and failure cleanup

Bounds-check dylink metadata parsing, require exact import and export names, and restore memory and function-table allocation offsets when language loading fails.

* fix(wasm): copy the complete supertype map
2026-08-20 21:02:11 +00:00

63 lines
1.6 KiB
TOML

[package]
name = "tree-sitter"
version.workspace = true
description = "Rust bindings to the Tree-sitter parsing library"
authors.workspace = true
edition.workspace = true
rust-version = "1.90"
readme = "binding_rust/README.md"
homepage.workspace = true
repository.workspace = true
documentation = "https://docs.rs/tree-sitter"
license.workspace = true
keywords.workspace = true
categories = [ "api-bindings", "external-ffi-bindings", "parsing", "text-editors" ]
build = "binding_rust/build.rs"
links = "tree-sitter"
include = [
"/binding_rust/*",
"/Cargo.toml",
"/src/*.h",
"/src/*.c",
"/src/portable/*",
"/src/unicode/*",
"/src/wasm-stdlib/**/*",
"/include/tree_sitter/api.h",
"/LICENSE",
]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [ "--cfg", "docsrs" ]
targets = [ "x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu" ]
[lints]
workspace = true
[features]
default = [ "std" ]
std = [ "regex/std", "regex/perf" ]
wasm = [ "std", "wasmtime-c-api" ]
[dependencies]
regex = { default-features = false, features = [ "unicode" ], version = "1.12.3" }
streaming-iterator = "0.1.9"
tree-sitter-language.workspace = true
[dependencies.wasmtime-c-api]
version = "48.0.0"
default-features = false
features = [ "cranelift", "gc", "gc-null" ]
optional = true
package = "wasmtime-c-api-impl"
[build-dependencies]
bindgen = { optional = true, version = "0.72.1" }
cc.workspace = true
serde_json.workspace = true
[lib]
path = "binding_rust/lib.rs"