diff --git a/.github/cliff.toml b/.github/cliff.toml index a4554961b..a8892d619 100644 --- a/.github/cliff.toml +++ b/.github/cliff.toml @@ -69,4 +69,4 @@ sort_commits = "oldest" [remote.github] owner = "tree-sitter" -repo = "tree-sitter" +repo = "tree-sitter" diff --git a/.taplo.toml b/.taplo.toml index 91d554ccc..9c248e5f8 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -1,20 +1,19 @@ [formatting] -align_entries = true -column_width = 100 -compact_arrays = false +column_width = 100 +compact_arrays = false reorder_inline_tables = true -reorder_keys = true +reorder_keys = true [[rule]] include = [ "**/Cargo.toml" ] -keys = [ "package" ] +keys = [ "package" ] [rule.formatting] reorder_keys = false [[rule]] include = [ "**/Cargo.toml" ] -keys = [ "profile" ] +keys = [ "profile" ] [rule.formatting] reorder_keys = false diff --git a/Cargo.toml b/Cargo.toml index 6274f0596..511d351ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,22 +14,22 @@ members = [ resolver = "2" [workspace.package] -authors = [ "Max Brunsfeld ", "Amaan Qureshi " ] -categories = [ "command-line-utilities", "parsing" ] -edition = "2024" -homepage = "https://tree-sitter.github.io/tree-sitter" -keywords = [ "incremental", "parsing" ] -license = "MIT" -repository = "https://github.com/tree-sitter/tree-sitter" +authors = [ "Max Brunsfeld ", "Amaan Qureshi " ] +categories = [ "command-line-utilities", "parsing" ] +edition = "2024" +homepage = "https://tree-sitter.github.io/tree-sitter" +keywords = [ "incremental", "parsing" ] +license = "MIT" +repository = "https://github.com/tree-sitter/tree-sitter" rust-version = "1.90" -version = "0.27.0" +version = "0.27.0" [workspace.lints.clippy] -cargo = { level = "warn", priority = -1 } +cargo = { level = "warn", priority = -1 } dbg_macro = "deny" -nursery = { level = "warn", priority = -1 } -pedantic = { level = "warn", priority = -1 } -todo = "deny" +nursery = { level = "warn", priority = -1 } +pedantic = { level = "warn", priority = -1 } +todo = "deny" # The lints below are a specific subset of the pedantic+nursery lints # that we explicitly allow in the tree-sitter codebase because they either: @@ -39,50 +39,50 @@ todo = "deny" # 3. Worsen the code cast_possible_truncation = "allow" -cast_possible_wrap = "allow" -cast_precision_loss = "allow" -cast_sign_loss = "allow" -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" -too_many_lines = "allow" -tuple_array_conversions = "allow" +cast_possible_wrap = "allow" +cast_precision_loss = "allow" +cast_sign_loss = "allow" +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" +too_many_lines = "allow" +tuple_array_conversions = "allow" [workspace.lints.rust] mismatched_lifetime_syntaxes = "allow" [profile.optimize] -inherits = "release" -codegen-units = 1 # Maximum size reduction optimizations. -lto = true # Link-time optimization. -opt-level = 3 # Optimization level 3. -strip = true # Automatically strip symbols from the binary. +inherits = "release" +codegen-units = 1 # Maximum size reduction optimizations. +lto = true # Link-time optimization. +opt-level = 3 # Optimization level 3. +strip = true # Automatically strip symbols from the binary. [profile.size] -inherits = "optimize" -opt-level = "s" # Optimize for size. +inherits = "optimize" +opt-level = "s" # Optimize for size. [profile.release-dev] -inherits = "release" -codegen-units = 256 -debug = true +inherits = "release" +codegen-units = 256 +debug = true debug-assertions = true -incremental = true -lto = false -overflow-checks = true +incremental = true +lto = false +overflow-checks = true [workspace.dependencies] ansi_colours = "1.2.3" anstyle = "1.0.14" anyhow = "1.0.102" -bstr = "1.12.1" -cc = "1.2.63" +bstr = "1.12.1" +cc = "1.2.63" clap = { features = [ "cargo", "derive", @@ -94,8 +94,8 @@ clap = { features = [ clap_complete = "4.6.3" clap_complete_nushell = "4.5.10" crc32fast = "1.5.0" -ctor = "0.6.3" -ctrlc = { features = [ "termination" ], version = "3.5.2" } +ctor = "0.6.3" +ctrlc = { features = [ "termination" ], version = "3.5.2" } dialoguer = { features = [ "fuzzy-select" ], version = "0.12.0" } etcetera = "0.11.0" glob = "0.3.3" @@ -109,13 +109,13 @@ log = { features = [ "std" ], version = "0.4.30" } memchr = "2.8.1" once_cell = "1.21.3" pretty_assertions = "1.4.1" -rand = "0.10.1" -regex = "1.12.3" +rand = "0.10.1" +regex = "1.12.3" regex-syntax = "0.8.9" rustc-hash = "2.1.1" -schemars = "1.2.1" -semver = { features = [ "serde" ], version = "1.0.27" } -serde = { features = [ "derive" ], version = "1.0.228" } +schemars = "1.2.1" +semver = { features = [ "serde" ], version = "1.0.27" } +serde = { features = [ "derive" ], version = "1.0.228" } serde_json = { features = [ "preserve_order" ], version = "1.0.150" } similar = "2.7.0" streaming-iterator = "0.1.9" @@ -128,11 +128,11 @@ walkdir = "2.5.0" wasmparser = "0.244.0" webbrowser = "1.2.1" -tree-sitter = { path = "./lib", 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 = { path = "./lib", version = "0.27.0" } +tree-sitter-config = { path = "./crates/config", version = "0.27.0" } +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-loader = { path = "./crates/loader", version = "0.27.0" } -tree-sitter-tags = { path = "./crates/tags", 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-language = { path = "./crates/language", version = "0.1.8" } diff --git a/Makefile b/Makefile index 9a19fbb14..b85311fb9 100644 --- a/Makefile +++ b/Makefile @@ -124,6 +124,7 @@ lint: cargo update --workspace --locked --quiet cargo fmt --all --check cargo clippy --workspace --all-targets -- -D warnings + taplo format --check lint-web: npm --prefix lib/binding_web ci diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 29a808f89..4ae10f3bb 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tree-sitter-cli" -version.workspace = true -description = "CLI tool for developing, testing, and using Tree-sitter parsers" -authors.workspace = true -edition.workspace = true +name = "tree-sitter-cli" +version.workspace = true +description = "CLI tool for developing, testing, and using Tree-sitter parsers" +authors.workspace = true +edition.workspace = true rust-version.workspace = true -readme = "README.md" -homepage.workspace = true -repository.workspace = true -documentation = "https://docs.rs/tree-sitter-cli" -license.workspace = true -keywords.workspace = true -categories.workspace = true -include = [ "build.rs", "README.md", "LICENSE", "benches/*", "src/**" ] +readme = "README.md" +homepage.workspace = true +repository.workspace = true +documentation = "https://docs.rs/tree-sitter-cli" +license.workspace = true +keywords.workspace = true +categories.workspace = true +include = [ "build.rs", "README.md", "LICENSE", "benches/*", "src/**" ] [lints] workspace = true @@ -21,66 +21,66 @@ workspace = true path = "src/tree_sitter_cli.rs" [[bin]] -doc = false +doc = false name = "tree-sitter" path = "src/main.rs" [[bench]] harness = false -name = "benchmark" +name = "benchmark" [features] default = [ "qjs-rt" ] -qjs-rt = [ "tree-sitter-generate/qjs-rt" ] -wasm = [ "tree-sitter/wasm", "tree-sitter-loader/wasm" ] +qjs-rt = [ "tree-sitter-generate/qjs-rt" ] +wasm = [ "tree-sitter/wasm", "tree-sitter-loader/wasm" ] [dependencies] -ansi_colours.workspace = true -anstyle.workspace = true -anyhow.workspace = true -bstr.workspace = true -clap.workspace = true -clap_complete.workspace = true +ansi_colours.workspace = true +anstyle.workspace = true +anyhow.workspace = true +bstr.workspace = true +clap.workspace = true +clap_complete.workspace = true clap_complete_nushell.workspace = true -crc32fast.workspace = true -ctor.workspace = true -ctrlc.workspace = true -dialoguer.workspace = true -glob.workspace = true -heck.workspace = true -html-escape.workspace = true -indoc.workspace = true -log.workspace = true -memchr.workspace = true -rand.workspace = true -regex.workspace = true -schemars.workspace = true -semver.workspace = true -serde.workspace = true -serde_json.workspace = true -similar.workspace = true -streaming-iterator.workspace = true -thiserror.workspace = true -tiny_http.workspace = true -walkdir.workspace = true -wasmparser.workspace = true -webbrowser.workspace = true +crc32fast.workspace = true +ctor.workspace = true +ctrlc.workspace = true +dialoguer.workspace = true +glob.workspace = true +heck.workspace = true +html-escape.workspace = true +indoc.workspace = true +log.workspace = true +memchr.workspace = true +rand.workspace = true +regex.workspace = true +schemars.workspace = true +semver.workspace = true +serde.workspace = true +serde_json.workspace = true +similar.workspace = true +streaming-iterator.workspace = true +thiserror.workspace = true +tiny_http.workspace = true +walkdir.workspace = true +wasmparser.workspace = true +webbrowser.workspace = true -tree-sitter.workspace = true -tree-sitter-config.workspace = true -tree-sitter-generate = { workspace = true, features = ["load"] } +tree-sitter.workspace = true +tree-sitter-config.workspace = true +tree-sitter-generate = { features = [ "load" ], workspace = true } tree-sitter-highlight.workspace = true -tree-sitter-loader.workspace = true -tree-sitter-tags.workspace = true +tree-sitter-loader.workspace = true +tree-sitter-tags.workspace = true [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" } -widestring = "1.2.1" +widestring = "1.2.1" pretty_assertions.workspace = true -tempfile.workspace = true -unindent.workspace = true +tempfile.workspace = true +unindent.workspace = true [package.metadata.binstall] pkg-fmt = "zip" diff --git a/crates/cli/src/templates/_cargo.toml b/crates/cli/src/templates/_cargo.toml index acca06365..091844b59 100644 --- a/crates/cli/src/templates/_cargo.toml +++ b/crates/cli/src/templates/_cargo.toml @@ -1,17 +1,17 @@ [package] -authors = [ "PARSER_AUTHOR_NAME PARSER_AUTHOR_EMAIL" ] +authors = [ "PARSER_AUTHOR_NAME PARSER_AUTHOR_EMAIL" ] autoexamples = false -categories = [ "parser-implementations", "parsing", "text-editors" ] -description = "PARSER_DESCRIPTION" -edition = "2024" -keywords = [ "incremental", "parsing", "tree-sitter", "PARSER_NAME" ] -license = "PARSER_LICENSE" -name = "tree-sitter-PARSER_NAME" -readme = "README.md" -repository = "PARSER_URL" -version = "PARSER_VERSION" +categories = [ "parser-implementations", "parsing", "text-editors" ] +description = "PARSER_DESCRIPTION" +edition = "2024" +keywords = [ "incremental", "parsing", "tree-sitter", "PARSER_NAME" ] +license = "PARSER_LICENSE" +name = "tree-sitter-PARSER_NAME" +readme = "README.md" +repository = "PARSER_URL" +version = "PARSER_VERSION" -build = "bindings/rust/build.rs" +build = "bindings/rust/build.rs" include = [ "bindings/rust/*", "grammar.js", "queries/*", "src/*", "tree-sitter.json", "/LICENSE" ] [lib] diff --git a/crates/cli/src/templates/pyproject.toml b/crates/cli/src/templates/pyproject.toml index cc12947bf..c7301ec6c 100644 --- a/crates/cli/src/templates/pyproject.toml +++ b/crates/cli/src/templates/pyproject.toml @@ -1,6 +1,6 @@ [build-system] build-backend = "setuptools.build_meta" -requires = [ "setuptools>=62.4.0", "wheel" ] +requires = [ "setuptools>=62.4.0", "wheel" ] [project] authors = [ { email = "PARSER_AUTHOR_EMAIL", name = "PARSER_AUTHOR_NAME" } ] @@ -19,12 +19,12 @@ requires-python = ">=3.10" version = "PARSER_VERSION" [project.urls] -Funding = "FUNDING_URL" +Funding = "FUNDING_URL" Homepage = "PARSER_URL" [project.optional-dependencies] core = [ "tree-sitter~=0.24" ] [tool.cibuildwheel] -build = "cp310-*" +build = "cp310-*" build-frontend = "build" diff --git a/crates/cli/src/tests/proc_macro/Cargo.toml b/crates/cli/src/tests/proc_macro/Cargo.toml index 8e16c3fdc..fec0b30fc 100644 --- a/crates/cli/src/tests/proc_macro/Cargo.toml +++ b/crates/cli/src/tests/proc_macro/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "tree-sitter-tests-proc-macro" -version = "0.0.0" -edition.workspace = true +name = "tree-sitter-tests-proc-macro" +version = "0.0.0" +edition.workspace = true rust-version.workspace = true -publish = false +publish = false [lints] workspace = true @@ -13,5 +13,5 @@ proc-macro = true [dependencies] proc-macro2 = "1.0.93" -quote = "1.0.38" -syn = { features = [ "full" ], version = "2.0.96" } +quote = "1.0.38" +syn = { features = [ "full" ], version = "2.0.96" } diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index 23e395031..641b434b3 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "tree-sitter-config" -version.workspace = true -description = "User configuration of tree-sitter's command line programs" -authors.workspace = true -edition.workspace = true +name = "tree-sitter-config" +version.workspace = true +description = "User configuration of tree-sitter's command line programs" +authors.workspace = true +edition.workspace = true rust-version.workspace = true -readme = "README.md" -homepage.workspace = true -repository.workspace = true -documentation = "https://docs.rs/tree-sitter-config" -license.workspace = true -keywords.workspace = true -categories.workspace = true +readme = "README.md" +homepage.workspace = true +repository.workspace = true +documentation = "https://docs.rs/tree-sitter-config" +license.workspace = true +keywords.workspace = true +categories.workspace = true [lib] path = "src/tree_sitter_config.rs" @@ -20,8 +20,8 @@ path = "src/tree_sitter_config.rs" workspace = true [dependencies] -etcetera.workspace = true -log.workspace = true -serde.workspace = true +etcetera.workspace = true +log.workspace = true +serde.workspace = true serde_json.workspace = true -thiserror.workspace = true +thiserror.workspace = true diff --git a/crates/generate/Cargo.toml b/crates/generate/Cargo.toml index bfe19a67d..bf782b296 100644 --- a/crates/generate/Cargo.toml +++ b/crates/generate/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "tree-sitter-generate" -version.workspace = true -description = "Library for generating C source code from a tree-sitter grammar" -authors.workspace = true -edition.workspace = true +name = "tree-sitter-generate" +version.workspace = true +description = "Library for generating C source code from a tree-sitter grammar" +authors.workspace = true +edition.workspace = true rust-version.workspace = true -readme = "README.md" -homepage.workspace = true -repository.workspace = true -documentation = "https://docs.rs/tree-sitter-generate" -license.workspace = true -keywords.workspace = true -categories.workspace = true +readme = "README.md" +homepage.workspace = true +repository.workspace = true +documentation = "https://docs.rs/tree-sitter-generate" +license.workspace = true +keywords.workspace = true +categories.workspace = true [lib] path = "src/generate.rs" @@ -21,8 +21,8 @@ workspace = true [features] default = [ "qjs-rt" ] -load = [ "dep:semver" ] -qjs-rt = [ "load", "rquickjs", "pathdiff" ] +load = [ "dep:semver" ] +qjs-rt = [ "load", "rquickjs", "pathdiff" ] [dependencies] bitflags = "2.11.1" diff --git a/crates/highlight/Cargo.toml b/crates/highlight/Cargo.toml index 2a5cd5861..cfce1fbbe 100644 --- a/crates/highlight/Cargo.toml +++ b/crates/highlight/Cargo.toml @@ -1,28 +1,28 @@ [package] -name = "tree-sitter-highlight" -version.workspace = true -description = "Library for performing syntax highlighting with Tree-sitter" -authors = [ "Max Brunsfeld ", "Tim Clem " ] -edition.workspace = true +name = "tree-sitter-highlight" +version.workspace = true +description = "Library for performing syntax highlighting with Tree-sitter" +authors = [ "Max Brunsfeld ", "Tim Clem " ] +edition.workspace = true rust-version.workspace = true -readme = "README.md" -homepage.workspace = true -repository.workspace = true -documentation = "https://docs.rs/tree-sitter-highlight" -license.workspace = true -keywords = [ "incremental", "parsing", "syntax", "highlighting" ] -categories = [ "parsing", "text-editors" ] +readme = "README.md" +homepage.workspace = true +repository.workspace = true +documentation = "https://docs.rs/tree-sitter-highlight" +license.workspace = true +keywords = [ "incremental", "parsing", "syntax", "highlighting" ] +categories = [ "parsing", "text-editors" ] [lints] workspace = true [lib] crate-type = [ "lib", "staticlib" ] -path = "src/highlight.rs" +path = "src/highlight.rs" [dependencies] -regex.workspace = true +regex.workspace = true streaming-iterator.workspace = true -thiserror.workspace = true +thiserror.workspace = true tree-sitter.workspace = true diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml index 0e1cb8a9f..436d15325 100644 --- a/crates/language/Cargo.toml +++ b/crates/language/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "tree-sitter-language" -description = "The tree-sitter Language type, used by the library and by language implementations" -version = "0.1.8" -authors.workspace = true -edition.workspace = true -rust-version = "1.90" -readme = "README.md" -homepage.workspace = true +name = "tree-sitter-language" +description = "The tree-sitter Language type, used by the library and by language implementations" +version = "0.1.8" +authors.workspace = true +edition.workspace = true +rust-version = "1.90" +readme = "README.md" +homepage.workspace = true repository.workspace = true -documentation = "https://docs.rs/tree-sitter-language" -license.workspace = true -keywords.workspace = true -categories = [ "api-bindings", "development-tools::ffi", "parsing" ] +documentation = "https://docs.rs/tree-sitter-language" +license.workspace = true +keywords.workspace = true +categories = [ "api-bindings", "development-tools::ffi", "parsing" ] build = "build.rs" links = "tree-sitter-language" diff --git a/crates/loader/Cargo.toml b/crates/loader/Cargo.toml index 0a3d4c15f..8e8181961 100644 --- a/crates/loader/Cargo.toml +++ b/crates/loader/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "tree-sitter-loader" -version.workspace = true -description = "Locates, builds, and loads tree-sitter grammars at runtime" -authors.workspace = true -edition.workspace = true +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 -documentation = "https://docs.rs/tree-sitter-loader" -license.workspace = true -keywords.workspace = true -categories.workspace = true +readme = "README.md" +homepage.workspace = true +repository.workspace = true +documentation = "https://docs.rs/tree-sitter-loader" +license.workspace = true +keywords.workspace = true +categories.workspace = true [package.metadata.docs.rs] all-features = true @@ -25,21 +25,21 @@ workspace = true [features] default = [ "tree-sitter-highlight", "tree-sitter-tags" ] -wasm = [ "tree-sitter/wasm" ] +wasm = [ "tree-sitter/wasm" ] [dependencies] -cc.workspace = true -etcetera.workspace = true +cc.workspace = true +etcetera.workspace = true libloading.workspace = true -log.workspace = true -once_cell.workspace = true -regex.workspace = true -semver.workspace = true -serde.workspace = true +log.workspace = true +once_cell.workspace = true +regex.workspace = true +semver.workspace = true +serde.workspace = true serde_json.workspace = true -tempfile.workspace = true -thiserror.workspace = true +tempfile.workspace = true +thiserror.workspace = true -tree-sitter = { workspace = true } +tree-sitter = { workspace = true } tree-sitter-highlight = { optional = true, workspace = true } -tree-sitter-tags = { optional = true, workspace = true } +tree-sitter-tags = { optional = true, workspace = true } diff --git a/crates/tags/Cargo.toml b/crates/tags/Cargo.toml index 97fcb2172..d229e3049 100644 --- a/crates/tags/Cargo.toml +++ b/crates/tags/Cargo.toml @@ -1,29 +1,29 @@ [package] -name = "tree-sitter-tags" -version.workspace = true -description = "Library for extracting tag information" -authors = [ "Max Brunsfeld ", "Patrick Thomson " ] -edition.workspace = true +name = "tree-sitter-tags" +version.workspace = true +description = "Library for extracting tag information" +authors = [ "Max Brunsfeld ", "Patrick Thomson " ] +edition.workspace = true rust-version.workspace = true -readme = "README.md" -homepage.workspace = true -repository.workspace = true -documentation = "https://docs.rs/tree-sitter-tags" -license.workspace = true -keywords = [ "incremental", "parsing", "syntax", "tagging" ] -categories = [ "parsing", "text-editors" ] +readme = "README.md" +homepage.workspace = true +repository.workspace = true +documentation = "https://docs.rs/tree-sitter-tags" +license.workspace = true +keywords = [ "incremental", "parsing", "syntax", "tagging" ] +categories = [ "parsing", "text-editors" ] [lints] workspace = true [lib] crate-type = [ "lib", "staticlib" ] -path = "src/tags.rs" +path = "src/tags.rs" [dependencies] -memchr.workspace = true -regex.workspace = true +memchr.workspace = true +regex.workspace = true streaming-iterator.workspace = true -thiserror.workspace = true +thiserror.workspace = true tree-sitter.workspace = true diff --git a/crates/xtask/Cargo.toml b/crates/xtask/Cargo.toml index e28a8c6fd..4993eebf3 100644 --- a/crates/xtask/Cargo.toml +++ b/crates/xtask/Cargo.toml @@ -1,31 +1,31 @@ [package] -name = "xtask" -version = "0.1.0" -authors.workspace = true -edition.workspace = true +name = "xtask" +version = "0.1.0" +authors.workspace = true +edition.workspace = true rust-version.workspace = true -homepage.workspace = true -repository.workspace = true -license.workspace = true -keywords.workspace = true -categories.workspace = true -publish = false +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true +publish = false [lints] workspace = true [dependencies] -anstyle.workspace = true -anyhow.workspace = true -bindgen = { version = "0.72.1" } -clap.workspace = true -etcetera.workspace = true -indoc.workspace = true -notify = "8.2.0" +anstyle.workspace = true +anyhow.workspace = true +bindgen = { version = "0.72.1" } +clap.workspace = true +etcetera.workspace = true +indoc.workspace = true +notify = "8.2.0" notify-debouncer-full = "0.7.0" -regex.workspace = true -schemars.workspace = true -semver.workspace = true -serde_json.workspace = true -tree-sitter-cli = { path = "../cli/" } -tree-sitter-loader = { path = "../loader/" } +regex.workspace = true +schemars.workspace = true +semver.workspace = true +serde_json.workspace = true +tree-sitter-cli = { path = "../cli/" } +tree-sitter-loader = { path = "../loader/" } diff --git a/docs/book.toml b/docs/book.toml index c0ba57fd9..8efc620e8 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -1,26 +1,26 @@ [book] -authors = [ "Max Brunsfeld ", "Amaan Qureshi " ] +authors = [ "Max Brunsfeld ", "Amaan Qureshi " ] language = "en" -src = "src" -title = "Tree-sitter" +src = "src" +title = "Tree-sitter" [output.html] -additional-css = [ "src/assets/css/playground.css", "src/assets/css/mdbook-admonish.css" ] -additional-js = [ "src/assets/js/playground.js" ] -edit-url-template = "https://github.com/tree-sitter/tree-sitter/edit/master/docs/{path}" +additional-css = [ "src/assets/css/playground.css", "src/assets/css/mdbook-admonish.css" ] +additional-js = [ "src/assets/js/playground.js" ] +edit-url-template = "https://github.com/tree-sitter/tree-sitter/edit/master/docs/{path}" 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] boost-hierarchy = 2 boost-paragraph = 1 -boost-title = 2 -expand = true -limit-results = 20 +boost-title = 2 +expand = true +limit-results = 20 use-boolean-and = true [preprocessor] [preprocessor.admonish] -assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` -command = "mdbook-admonish" +assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install` +command = "mdbook-admonish" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 13ac76962..b0080a32c 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -1,17 +1,17 @@ [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 +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" ] +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" @@ -31,31 +31,31 @@ include = [ [package.metadata.docs.rs] all-features = true 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] workspace = true [features] default = [ "std" ] -std = [ "regex/std", "regex/perf" ] -wasm = [ "std", "wasmtime-c-api" ] +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" +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.1" default-features = false -features = [ "cranelift", "gc", "gc-null" ] -optional = true -package = "wasmtime-c-api-impl" +features = [ "cranelift", "gc", "gc-null" ] +optional = true +package = "wasmtime-c-api-impl" +version = "48.0.1" [build-dependencies] -bindgen = { optional = true, version = "0.72.1" } -cc.workspace = true +bindgen = { optional = true, version = "0.72.1" } +cc.workspace = true serde_json.workspace = true [lib] diff --git a/test/fixtures/rust_wasm_web/Cargo.toml b/test/fixtures/rust_wasm_web/Cargo.toml index cc9415a50..55dc377a6 100644 --- a/test/fixtures/rust_wasm_web/Cargo.toml +++ b/test/fixtures/rust_wasm_web/Cargo.toml @@ -6,8 +6,8 @@ rust-version = "1.90" publish = false [lib] +crate-type = [ "cdylib" ] path = "src/rust_wasm_web.rs" -crate-type = ["cdylib"] [dependencies] tree-sitter = { path = "../../../lib" }