[package]
edition = "2024"
rust-version = "1.90"
name = "tree-sitter"
version = "0.27.0"
authors = [
"Max Brunsfeld <maxbrunsfeld@gmail.com>",
"Amaan Qureshi <amaanq12@gmail.com>",
]
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",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust bindings to the Tree-sitter parsing library"
homepage = "https://tree-sitter.github.io/tree-sitter"
documentation = "https://docs.rs/tree-sitter"
readme = "binding_rust/README.md"
keywords = [
"incremental",
"parsing",
]
categories = [
"api-bindings",
"external-ffi-bindings",
"parsing",
"text-editors",
]
license = "MIT"
repository = "https://github.com/tree-sitter/tree-sitter"
resolver = "2"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-gnu",
]
[features]
default = ["std"]
std = [
"regex/std",
"regex/perf",
]
wasm = [
"std",
"wasmtime-c-api",
]
[lib]
name = "tree_sitter"
path = "binding_rust/lib.rs"
[dependencies.regex]
version = "1.12.3"
features = ["unicode"]
default-features = false
[dependencies.streaming-iterator]
version = "0.1.9"
[dependencies.tree-sitter-language]
version = "0.1.8"
[dependencies.wasmtime-c-api]
version = "48.0.1"
features = [
"cranelift",
"gc",
"gc-null",
]
optional = true
default-features = false
package = "wasmtime-c-api-impl"
[build-dependencies.bindgen]
version = "0.72.1"
optional = true
[build-dependencies.cc]
version = "1.2.63"
[build-dependencies.serde_json]
version = "1.0.150"
features = ["preserve_order"]
[lints.clippy]
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
dbg_macro = "deny"
if_not_else = "allow"
items_after_statements = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
multiple_crate_versions = "allow"
option_if_let_else = "allow"
similar_names = "allow"
string_lit_as_bytes = "allow"
struct_excessive_bools = "allow"
todo = "deny"
too_many_lines = "allow"
tuple_array_conversions = "allow"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
mismatched_lifetime_syntaxes = "allow"