tree-sitter/lib/Cargo.toml
Douglas Creager 44aa80d678
feat: include build script links in Rust bindings
This patch updates the Rust binding's build script to output [build
metadata][links].  This makes it easier for downstream crates to
determine the include path, in case they need to compile their own C
code that requires the tree-sitter headers.

[links]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key
2024-02-05 20:05:05 -05:00

51 lines
1.1 KiB
TOML

[package]
name = "tree-sitter"
description = "Rust bindings to the Tree-sitter parsing library"
version = "0.20.10"
authors = ["Max Brunsfeld <maxbrunsfeld@gmail.com>"]
edition = "2021"
license = "MIT"
readme = "binding_rust/README.md"
keywords = ["incremental", "parsing"]
categories = ["api-bindings", "parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter"
rust-version.workspace = true
build = "binding_rust/build.rs"
links = "tree-sitter"
include = [
"/binding_rust/*",
"/Cargo.toml",
"/src/*.h",
"/src/*.c",
"/src/unicode/*",
"/include/tree_sitter/api.h",
]
[features]
wasm = ["wasmtime", "wasmtime-c-api"]
[dependencies]
regex = "1.9.1"
[dependencies.wasmtime]
git = "https://github.com/bytecodealliance/wasmtime"
rev = "v16.0.0"
optional = true
default-features = false
features = ["cranelift"]
[dependencies.wasmtime-c-api]
git = "https://github.com/bytecodealliance/wasmtime"
rev = "v16.0.0"
optional = true
package = "wasmtime-c-api-impl"
default-features = false
[build-dependencies]
bindgen = { version = "^0.66.1", optional = true }
cc = "^1.0.79"
[lib]
path = "binding_rust/lib.rs"