fix(toml): drop align_entries = true from .taplo.toml

This key was being applied inconsistently depending on nesting level.
This commit is contained in:
Will Lillis 2026-08-29 04:36:06 -04:00 committed by Christian Clason
parent 7a2dd61a7c
commit d9cb739430
18 changed files with 291 additions and 291 deletions

2
.github/cliff.toml vendored
View file

@ -69,4 +69,4 @@ sort_commits = "oldest"
[remote.github] [remote.github]
owner = "tree-sitter" owner = "tree-sitter"
repo = "tree-sitter" repo = "tree-sitter"

View file

@ -1,20 +1,19 @@
[formatting] [formatting]
align_entries = true column_width = 100
column_width = 100 compact_arrays = false
compact_arrays = false
reorder_inline_tables = true reorder_inline_tables = true
reorder_keys = true reorder_keys = true
[[rule]] [[rule]]
include = [ "**/Cargo.toml" ] include = [ "**/Cargo.toml" ]
keys = [ "package" ] keys = [ "package" ]
[rule.formatting] [rule.formatting]
reorder_keys = false reorder_keys = false
[[rule]] [[rule]]
include = [ "**/Cargo.toml" ] include = [ "**/Cargo.toml" ]
keys = [ "profile" ] keys = [ "profile" ]
[rule.formatting] [rule.formatting]
reorder_keys = false reorder_keys = false

View file

@ -14,22 +14,22 @@ members = [
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Amaan Qureshi <amaanq12@gmail.com>" ] authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Amaan Qureshi <amaanq12@gmail.com>" ]
categories = [ "command-line-utilities", "parsing" ] categories = [ "command-line-utilities", "parsing" ]
edition = "2024" edition = "2024"
homepage = "https://tree-sitter.github.io/tree-sitter" homepage = "https://tree-sitter.github.io/tree-sitter"
keywords = [ "incremental", "parsing" ] keywords = [ "incremental", "parsing" ]
license = "MIT" license = "MIT"
repository = "https://github.com/tree-sitter/tree-sitter" repository = "https://github.com/tree-sitter/tree-sitter"
rust-version = "1.90" rust-version = "1.90"
version = "0.27.0" version = "0.27.0"
[workspace.lints.clippy] [workspace.lints.clippy]
cargo = { level = "warn", priority = -1 } cargo = { level = "warn", priority = -1 }
dbg_macro = "deny" dbg_macro = "deny"
nursery = { level = "warn", priority = -1 } nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 } pedantic = { level = "warn", priority = -1 }
todo = "deny" todo = "deny"
# The lints below are a specific subset of the pedantic+nursery lints # The lints below are a specific subset of the pedantic+nursery lints
# that we explicitly allow in the tree-sitter codebase because they either: # that we explicitly allow in the tree-sitter codebase because they either:
@ -39,50 +39,50 @@ todo = "deny"
# 3. Worsen the code # 3. Worsen the code
cast_possible_truncation = "allow" cast_possible_truncation = "allow"
cast_possible_wrap = "allow" cast_possible_wrap = "allow"
cast_precision_loss = "allow" cast_precision_loss = "allow"
cast_sign_loss = "allow" cast_sign_loss = "allow"
if_not_else = "allow" if_not_else = "allow"
items_after_statements = "allow" items_after_statements = "allow"
missing_errors_doc = "allow" missing_errors_doc = "allow"
missing_panics_doc = "allow" missing_panics_doc = "allow"
multiple_crate_versions = "allow" multiple_crate_versions = "allow"
option_if_let_else = "allow" option_if_let_else = "allow"
similar_names = "allow" similar_names = "allow"
string_lit_as_bytes = "allow" string_lit_as_bytes = "allow"
struct_excessive_bools = "allow" struct_excessive_bools = "allow"
too_many_lines = "allow" too_many_lines = "allow"
tuple_array_conversions = "allow" tuple_array_conversions = "allow"
[workspace.lints.rust] [workspace.lints.rust]
mismatched_lifetime_syntaxes = "allow" mismatched_lifetime_syntaxes = "allow"
[profile.optimize] [profile.optimize]
inherits = "release" inherits = "release"
codegen-units = 1 # Maximum size reduction optimizations. codegen-units = 1 # Maximum size reduction optimizations.
lto = true # Link-time optimization. lto = true # Link-time optimization.
opt-level = 3 # Optimization level 3. opt-level = 3 # Optimization level 3.
strip = true # Automatically strip symbols from the binary. strip = true # Automatically strip symbols from the binary.
[profile.size] [profile.size]
inherits = "optimize" inherits = "optimize"
opt-level = "s" # Optimize for size. opt-level = "s" # Optimize for size.
[profile.release-dev] [profile.release-dev]
inherits = "release" inherits = "release"
codegen-units = 256 codegen-units = 256
debug = true debug = true
debug-assertions = true debug-assertions = true
incremental = true incremental = true
lto = false lto = false
overflow-checks = true overflow-checks = true
[workspace.dependencies] [workspace.dependencies]
ansi_colours = "1.2.3" ansi_colours = "1.2.3"
anstyle = "1.0.14" anstyle = "1.0.14"
anyhow = "1.0.102" anyhow = "1.0.102"
bstr = "1.12.1" bstr = "1.12.1"
cc = "1.2.63" cc = "1.2.63"
clap = { features = [ clap = { features = [
"cargo", "cargo",
"derive", "derive",
@ -94,8 +94,8 @@ clap = { features = [
clap_complete = "4.6.3" clap_complete = "4.6.3"
clap_complete_nushell = "4.5.10" clap_complete_nushell = "4.5.10"
crc32fast = "1.5.0" crc32fast = "1.5.0"
ctor = "0.6.3" ctor = "0.6.3"
ctrlc = { features = [ "termination" ], version = "3.5.2" } ctrlc = { features = [ "termination" ], version = "3.5.2" }
dialoguer = { features = [ "fuzzy-select" ], version = "0.12.0" } dialoguer = { features = [ "fuzzy-select" ], version = "0.12.0" }
etcetera = "0.11.0" etcetera = "0.11.0"
glob = "0.3.3" glob = "0.3.3"
@ -109,13 +109,13 @@ log = { features = [ "std" ], version = "0.4.30" }
memchr = "2.8.1" memchr = "2.8.1"
once_cell = "1.21.3" once_cell = "1.21.3"
pretty_assertions = "1.4.1" pretty_assertions = "1.4.1"
rand = "0.10.1" rand = "0.10.1"
regex = "1.12.3" regex = "1.12.3"
regex-syntax = "0.8.9" regex-syntax = "0.8.9"
rustc-hash = "2.1.1" rustc-hash = "2.1.1"
schemars = "1.2.1" schemars = "1.2.1"
semver = { features = [ "serde" ], version = "1.0.27" } semver = { features = [ "serde" ], version = "1.0.27" }
serde = { features = [ "derive" ], version = "1.0.228" } serde = { features = [ "derive" ], version = "1.0.228" }
serde_json = { features = [ "preserve_order" ], version = "1.0.150" } serde_json = { features = [ "preserve_order" ], version = "1.0.150" }
similar = "2.7.0" similar = "2.7.0"
streaming-iterator = "0.1.9" streaming-iterator = "0.1.9"
@ -128,11 +128,11 @@ walkdir = "2.5.0"
wasmparser = "0.244.0" wasmparser = "0.244.0"
webbrowser = "1.2.1" webbrowser = "1.2.1"
tree-sitter = { path = "./lib", version = "0.27.0" } tree-sitter = { path = "./lib", version = "0.27.0" }
tree-sitter-config = { path = "./crates/config", version = "0.27.0" } tree-sitter-config = { path = "./crates/config", version = "0.27.0" }
tree-sitter-generate = { path = "./crates/generate", version = "0.27.0", default-features = false } tree-sitter-generate = { default-features = false, path = "./crates/generate", version = "0.27.0" }
tree-sitter-highlight = { path = "./crates/highlight", version = "0.27.0" } tree-sitter-highlight = { path = "./crates/highlight", version = "0.27.0" }
tree-sitter-loader = { path = "./crates/loader", version = "0.27.0" } tree-sitter-loader = { path = "./crates/loader", version = "0.27.0" }
tree-sitter-tags = { path = "./crates/tags", version = "0.27.0" } tree-sitter-tags = { path = "./crates/tags", version = "0.27.0" }
tree-sitter-language = { path = "./crates/language", version = "0.1.8" } tree-sitter-language = { path = "./crates/language", version = "0.1.8" }

View file

@ -124,6 +124,7 @@ lint:
cargo update --workspace --locked --quiet cargo update --workspace --locked --quiet
cargo fmt --all --check cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings cargo clippy --workspace --all-targets -- -D warnings
taplo format --check
lint-web: lint-web:
npm --prefix lib/binding_web ci npm --prefix lib/binding_web ci

View file

@ -1,18 +1,18 @@
[package] [package]
name = "tree-sitter-cli" name = "tree-sitter-cli"
version.workspace = true version.workspace = true
description = "CLI tool for developing, testing, and using Tree-sitter parsers" description = "CLI tool for developing, testing, and using Tree-sitter parsers"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-cli" documentation = "https://docs.rs/tree-sitter-cli"
license.workspace = true license.workspace = true
keywords.workspace = true keywords.workspace = true
categories.workspace = true categories.workspace = true
include = [ "build.rs", "README.md", "LICENSE", "benches/*", "src/**" ] include = [ "build.rs", "README.md", "LICENSE", "benches/*", "src/**" ]
[lints] [lints]
workspace = true workspace = true
@ -21,66 +21,66 @@ workspace = true
path = "src/tree_sitter_cli.rs" path = "src/tree_sitter_cli.rs"
[[bin]] [[bin]]
doc = false doc = false
name = "tree-sitter" name = "tree-sitter"
path = "src/main.rs" path = "src/main.rs"
[[bench]] [[bench]]
harness = false harness = false
name = "benchmark" name = "benchmark"
[features] [features]
default = [ "qjs-rt" ] default = [ "qjs-rt" ]
qjs-rt = [ "tree-sitter-generate/qjs-rt" ] qjs-rt = [ "tree-sitter-generate/qjs-rt" ]
wasm = [ "tree-sitter/wasm", "tree-sitter-loader/wasm" ] wasm = [ "tree-sitter/wasm", "tree-sitter-loader/wasm" ]
[dependencies] [dependencies]
ansi_colours.workspace = true ansi_colours.workspace = true
anstyle.workspace = true anstyle.workspace = true
anyhow.workspace = true anyhow.workspace = true
bstr.workspace = true bstr.workspace = true
clap.workspace = true clap.workspace = true
clap_complete.workspace = true clap_complete.workspace = true
clap_complete_nushell.workspace = true clap_complete_nushell.workspace = true
crc32fast.workspace = true crc32fast.workspace = true
ctor.workspace = true ctor.workspace = true
ctrlc.workspace = true ctrlc.workspace = true
dialoguer.workspace = true dialoguer.workspace = true
glob.workspace = true glob.workspace = true
heck.workspace = true heck.workspace = true
html-escape.workspace = true html-escape.workspace = true
indoc.workspace = true indoc.workspace = true
log.workspace = true log.workspace = true
memchr.workspace = true memchr.workspace = true
rand.workspace = true rand.workspace = true
regex.workspace = true regex.workspace = true
schemars.workspace = true schemars.workspace = true
semver.workspace = true semver.workspace = true
serde.workspace = true serde.workspace = true
serde_json.workspace = true serde_json.workspace = true
similar.workspace = true similar.workspace = true
streaming-iterator.workspace = true streaming-iterator.workspace = true
thiserror.workspace = true thiserror.workspace = true
tiny_http.workspace = true tiny_http.workspace = true
walkdir.workspace = true walkdir.workspace = true
wasmparser.workspace = true wasmparser.workspace = true
webbrowser.workspace = true webbrowser.workspace = true
tree-sitter.workspace = true tree-sitter.workspace = true
tree-sitter-config.workspace = true tree-sitter-config.workspace = true
tree-sitter-generate = { workspace = true, features = ["load"] } tree-sitter-generate = { features = [ "load" ], workspace = true }
tree-sitter-highlight.workspace = true tree-sitter-highlight.workspace = true
tree-sitter-loader.workspace = true tree-sitter-loader.workspace = true
tree-sitter-tags.workspace = true tree-sitter-tags.workspace = true
[dev-dependencies] [dev-dependencies]
encoding_rs = "0.8.35" encoding_rs = "0.8.35"
tree_sitter_proc_macro = { package = "tree-sitter-tests-proc-macro", path = "src/tests/proc_macro" } tree_sitter_proc_macro = { package = "tree-sitter-tests-proc-macro", path = "src/tests/proc_macro" }
widestring = "1.2.1" widestring = "1.2.1"
pretty_assertions.workspace = true pretty_assertions.workspace = true
tempfile.workspace = true tempfile.workspace = true
unindent.workspace = true unindent.workspace = true
[package.metadata.binstall] [package.metadata.binstall]
pkg-fmt = "zip" pkg-fmt = "zip"

View file

@ -1,17 +1,17 @@
[package] [package]
authors = [ "PARSER_AUTHOR_NAME PARSER_AUTHOR_EMAIL" ] authors = [ "PARSER_AUTHOR_NAME PARSER_AUTHOR_EMAIL" ]
autoexamples = false autoexamples = false
categories = [ "parser-implementations", "parsing", "text-editors" ] categories = [ "parser-implementations", "parsing", "text-editors" ]
description = "PARSER_DESCRIPTION" description = "PARSER_DESCRIPTION"
edition = "2024" edition = "2024"
keywords = [ "incremental", "parsing", "tree-sitter", "PARSER_NAME" ] keywords = [ "incremental", "parsing", "tree-sitter", "PARSER_NAME" ]
license = "PARSER_LICENSE" license = "PARSER_LICENSE"
name = "tree-sitter-PARSER_NAME" name = "tree-sitter-PARSER_NAME"
readme = "README.md" readme = "README.md"
repository = "PARSER_URL" repository = "PARSER_URL"
version = "PARSER_VERSION" version = "PARSER_VERSION"
build = "bindings/rust/build.rs" build = "bindings/rust/build.rs"
include = [ "bindings/rust/*", "grammar.js", "queries/*", "src/*", "tree-sitter.json", "/LICENSE" ] include = [ "bindings/rust/*", "grammar.js", "queries/*", "src/*", "tree-sitter.json", "/LICENSE" ]
[lib] [lib]

View file

@ -1,6 +1,6 @@
[build-system] [build-system]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
requires = [ "setuptools>=62.4.0", "wheel" ] requires = [ "setuptools>=62.4.0", "wheel" ]
[project] [project]
authors = [ { email = "PARSER_AUTHOR_EMAIL", name = "PARSER_AUTHOR_NAME" } ] authors = [ { email = "PARSER_AUTHOR_EMAIL", name = "PARSER_AUTHOR_NAME" } ]
@ -19,12 +19,12 @@ requires-python = ">=3.10"
version = "PARSER_VERSION" version = "PARSER_VERSION"
[project.urls] [project.urls]
Funding = "FUNDING_URL" Funding = "FUNDING_URL"
Homepage = "PARSER_URL" Homepage = "PARSER_URL"
[project.optional-dependencies] [project.optional-dependencies]
core = [ "tree-sitter~=0.24" ] core = [ "tree-sitter~=0.24" ]
[tool.cibuildwheel] [tool.cibuildwheel]
build = "cp310-*" build = "cp310-*"
build-frontend = "build" build-frontend = "build"

View file

@ -1,9 +1,9 @@
[package] [package]
name = "tree-sitter-tests-proc-macro" name = "tree-sitter-tests-proc-macro"
version = "0.0.0" version = "0.0.0"
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
publish = false publish = false
[lints] [lints]
workspace = true workspace = true
@ -13,5 +13,5 @@ proc-macro = true
[dependencies] [dependencies]
proc-macro2 = "1.0.93" proc-macro2 = "1.0.93"
quote = "1.0.38" quote = "1.0.38"
syn = { features = [ "full" ], version = "2.0.96" } syn = { features = [ "full" ], version = "2.0.96" }

View file

@ -1,17 +1,17 @@
[package] [package]
name = "tree-sitter-config" name = "tree-sitter-config"
version.workspace = true version.workspace = true
description = "User configuration of tree-sitter's command line programs" description = "User configuration of tree-sitter's command line programs"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-config" documentation = "https://docs.rs/tree-sitter-config"
license.workspace = true license.workspace = true
keywords.workspace = true keywords.workspace = true
categories.workspace = true categories.workspace = true
[lib] [lib]
path = "src/tree_sitter_config.rs" path = "src/tree_sitter_config.rs"
@ -20,8 +20,8 @@ path = "src/tree_sitter_config.rs"
workspace = true workspace = true
[dependencies] [dependencies]
etcetera.workspace = true etcetera.workspace = true
log.workspace = true log.workspace = true
serde.workspace = true serde.workspace = true
serde_json.workspace = true serde_json.workspace = true
thiserror.workspace = true thiserror.workspace = true

View file

@ -1,17 +1,17 @@
[package] [package]
name = "tree-sitter-generate" name = "tree-sitter-generate"
version.workspace = true version.workspace = true
description = "Library for generating C source code from a tree-sitter grammar" description = "Library for generating C source code from a tree-sitter grammar"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-generate" documentation = "https://docs.rs/tree-sitter-generate"
license.workspace = true license.workspace = true
keywords.workspace = true keywords.workspace = true
categories.workspace = true categories.workspace = true
[lib] [lib]
path = "src/generate.rs" path = "src/generate.rs"
@ -21,8 +21,8 @@ workspace = true
[features] [features]
default = [ "qjs-rt" ] default = [ "qjs-rt" ]
load = [ "dep:semver" ] load = [ "dep:semver" ]
qjs-rt = [ "load", "rquickjs", "pathdiff" ] qjs-rt = [ "load", "rquickjs", "pathdiff" ]
[dependencies] [dependencies]
bitflags = "2.11.1" bitflags = "2.11.1"

View file

@ -1,28 +1,28 @@
[package] [package]
name = "tree-sitter-highlight" name = "tree-sitter-highlight"
version.workspace = true version.workspace = true
description = "Library for performing syntax highlighting with Tree-sitter" description = "Library for performing syntax highlighting with Tree-sitter"
authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Tim Clem <timothy.clem@gmail.com>" ] authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Tim Clem <timothy.clem@gmail.com>" ]
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-highlight" documentation = "https://docs.rs/tree-sitter-highlight"
license.workspace = true license.workspace = true
keywords = [ "incremental", "parsing", "syntax", "highlighting" ] keywords = [ "incremental", "parsing", "syntax", "highlighting" ]
categories = [ "parsing", "text-editors" ] categories = [ "parsing", "text-editors" ]
[lints] [lints]
workspace = true workspace = true
[lib] [lib]
crate-type = [ "lib", "staticlib" ] crate-type = [ "lib", "staticlib" ]
path = "src/highlight.rs" path = "src/highlight.rs"
[dependencies] [dependencies]
regex.workspace = true regex.workspace = true
streaming-iterator.workspace = true streaming-iterator.workspace = true
thiserror.workspace = true thiserror.workspace = true
tree-sitter.workspace = true tree-sitter.workspace = true

View file

@ -1,17 +1,17 @@
[package] [package]
name = "tree-sitter-language" name = "tree-sitter-language"
description = "The tree-sitter Language type, used by the library and by language implementations" description = "The tree-sitter Language type, used by the library and by language implementations"
version = "0.1.8" version = "0.1.8"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
rust-version = "1.90" rust-version = "1.90"
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-language" documentation = "https://docs.rs/tree-sitter-language"
license.workspace = true license.workspace = true
keywords.workspace = true keywords.workspace = true
categories = [ "api-bindings", "development-tools::ffi", "parsing" ] categories = [ "api-bindings", "development-tools::ffi", "parsing" ]
build = "build.rs" build = "build.rs"
links = "tree-sitter-language" links = "tree-sitter-language"

View file

@ -1,17 +1,17 @@
[package] [package]
name = "tree-sitter-loader" name = "tree-sitter-loader"
version.workspace = true version.workspace = true
description = "Locates, builds, and loads tree-sitter grammars at runtime" description = "Locates, builds, and loads tree-sitter grammars at runtime"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-loader" documentation = "https://docs.rs/tree-sitter-loader"
license.workspace = true license.workspace = true
keywords.workspace = true keywords.workspace = true
categories.workspace = true categories.workspace = true
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
@ -25,21 +25,21 @@ workspace = true
[features] [features]
default = [ "tree-sitter-highlight", "tree-sitter-tags" ] default = [ "tree-sitter-highlight", "tree-sitter-tags" ]
wasm = [ "tree-sitter/wasm" ] wasm = [ "tree-sitter/wasm" ]
[dependencies] [dependencies]
cc.workspace = true cc.workspace = true
etcetera.workspace = true etcetera.workspace = true
libloading.workspace = true libloading.workspace = true
log.workspace = true log.workspace = true
once_cell.workspace = true once_cell.workspace = true
regex.workspace = true regex.workspace = true
semver.workspace = true semver.workspace = true
serde.workspace = true serde.workspace = true
serde_json.workspace = true serde_json.workspace = true
tempfile.workspace = true tempfile.workspace = true
thiserror.workspace = true thiserror.workspace = true
tree-sitter = { workspace = true } tree-sitter = { workspace = true }
tree-sitter-highlight = { optional = true, workspace = true } tree-sitter-highlight = { optional = true, workspace = true }
tree-sitter-tags = { optional = true, workspace = true } tree-sitter-tags = { optional = true, workspace = true }

View file

@ -1,29 +1,29 @@
[package] [package]
name = "tree-sitter-tags" name = "tree-sitter-tags"
version.workspace = true version.workspace = true
description = "Library for extracting tag information" description = "Library for extracting tag information"
authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Patrick Thomson <patrickt@github.com>" ] authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Patrick Thomson <patrickt@github.com>" ]
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
readme = "README.md" readme = "README.md"
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
documentation = "https://docs.rs/tree-sitter-tags" documentation = "https://docs.rs/tree-sitter-tags"
license.workspace = true license.workspace = true
keywords = [ "incremental", "parsing", "syntax", "tagging" ] keywords = [ "incremental", "parsing", "syntax", "tagging" ]
categories = [ "parsing", "text-editors" ] categories = [ "parsing", "text-editors" ]
[lints] [lints]
workspace = true workspace = true
[lib] [lib]
crate-type = [ "lib", "staticlib" ] crate-type = [ "lib", "staticlib" ]
path = "src/tags.rs" path = "src/tags.rs"
[dependencies] [dependencies]
memchr.workspace = true memchr.workspace = true
regex.workspace = true regex.workspace = true
streaming-iterator.workspace = true streaming-iterator.workspace = true
thiserror.workspace = true thiserror.workspace = true
tree-sitter.workspace = true tree-sitter.workspace = true

View file

@ -1,31 +1,31 @@
[package] [package]
name = "xtask" name = "xtask"
version = "0.1.0" version = "0.1.0"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
homepage.workspace = true homepage.workspace = true
repository.workspace = true repository.workspace = true
license.workspace = true license.workspace = true
keywords.workspace = true keywords.workspace = true
categories.workspace = true categories.workspace = true
publish = false publish = false
[lints] [lints]
workspace = true workspace = true
[dependencies] [dependencies]
anstyle.workspace = true anstyle.workspace = true
anyhow.workspace = true anyhow.workspace = true
bindgen = { version = "0.72.1" } bindgen = { version = "0.72.1" }
clap.workspace = true clap.workspace = true
etcetera.workspace = true etcetera.workspace = true
indoc.workspace = true indoc.workspace = true
notify = "8.2.0" notify = "8.2.0"
notify-debouncer-full = "0.7.0" notify-debouncer-full = "0.7.0"
regex.workspace = true regex.workspace = true
schemars.workspace = true schemars.workspace = true
semver.workspace = true semver.workspace = true
serde_json.workspace = true serde_json.workspace = true
tree-sitter-cli = { path = "../cli/" } tree-sitter-cli = { path = "../cli/" }
tree-sitter-loader = { path = "../loader/" } tree-sitter-loader = { path = "../loader/" }

View file

@ -1,26 +1,26 @@
[book] [book]
authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Amaan Qureshi <amaanq12@gmail.com>" ] authors = [ "Max Brunsfeld <maxbrunsfeld@gmail.com>", "Amaan Qureshi <amaanq12@gmail.com>" ]
language = "en" language = "en"
src = "src" src = "src"
title = "Tree-sitter" title = "Tree-sitter"
[output.html] [output.html]
additional-css = [ "src/assets/css/playground.css", "src/assets/css/mdbook-admonish.css" ] additional-css = [ "src/assets/css/playground.css", "src/assets/css/mdbook-admonish.css" ]
additional-js = [ "src/assets/js/playground.js" ] additional-js = [ "src/assets/js/playground.js" ]
edit-url-template = "https://github.com/tree-sitter/tree-sitter/edit/master/docs/{path}" edit-url-template = "https://github.com/tree-sitter/tree-sitter/edit/master/docs/{path}"
git-repository-icon = "fa-github" git-repository-icon = "fa-github"
git-repository-url = "https://github.com/tree-sitter/tree-sitter" git-repository-url = "https://github.com/tree-sitter/tree-sitter"
[output.html.search] [output.html.search]
boost-hierarchy = 2 boost-hierarchy = 2
boost-paragraph = 1 boost-paragraph = 1
boost-title = 2 boost-title = 2
expand = true expand = true
limit-results = 20 limit-results = 20
use-boolean-and = true use-boolean-and = true
[preprocessor] [preprocessor]
[preprocessor.admonish] [preprocessor.admonish]
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`
command = "mdbook-admonish" command = "mdbook-admonish"

View file

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

View file

@ -6,8 +6,8 @@ rust-version = "1.90"
publish = false publish = false
[lib] [lib]
crate-type = [ "cdylib" ]
path = "src/rust_wasm_web.rs" path = "src/rust_wasm_web.rs"
crate-type = ["cdylib"]
[dependencies] [dependencies]
tree-sitter = { path = "../../../lib" } tree-sitter = { path = "../../../lib" }