@willbooster/tree-sitter-rust 18.0.0 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,17 +17,17 @@ This fork fixes parsing bugs and raises conformance with [The Rust Reference](ht
17
17
  ## Support Scope
18
18
 
19
19
  This fork maintains only full parsing: valid input yields a correct tree, and invalid input yields `ERROR` or `MISSING`
20
- nodes without crashing, hanging, or taking more than linear time. Incremental parsing works as in upstream tree-sitter
21
- but is not tested here, and no queries (highlights, locals, injections, tags) are shipped. Node types, field names, and
22
- the trees that error recovery produces may change; such changes are released as new major versions.
20
+ nodes without crashing, hanging, or taking more than linear time. Incremental parsing is not supported, and no queries
21
+ (highlights, locals, injections, tags) are shipped. Node types, field names, and the trees that error recovery produces
22
+ may change; such changes are released as new major versions.
23
23
 
24
24
  ## Usage
25
25
 
26
26
  The npm package ships `tree-sitter-rust.wasm` for
27
27
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter), which runs in Node.js, Bun,
28
- browsers, and Cloudflare Workers. The parser requires `@willbooster/web-tree-sitter` 19.1.1 or later within major
29
- version 19. Its ABI (`0x5742000c`) rejects upstream Tree-sitter runtimes. Earlier `17.x` and `18.x` WillBooster runtimes
30
- share ABI `0x5742000c` and pass the ABI check, but dereference unused `TSLanguage` tables that `19.1.0` and later omit.
28
+ browsers, and Cloudflare Workers. The package requires `@willbooster/web-tree-sitter` `20.0.0` or later within major
29
+ version 20. Its ABI (`0x5742000c`) rejects upstream Tree-sitter runtimes. Earlier `17.x` and `18.x` WillBooster runtimes
30
+ share ABI `0x5742000c` and pass the ABI check, but dereference unused `TSLanguage` tables omitted since `19.1.0`.
31
31
 
32
32
  In Node.js and Bun, load the grammar from its path:
33
33
 
@@ -70,19 +70,20 @@ parser.setLanguage(await Language.load(rust));
70
70
  The package also ships the node types in `src/node-types.json`.
71
71
 
72
72
  In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-rust) and on
73
- [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
74
- fuzzed with. The parser requires `willbooster-tree-sitter` 19.1.1 or later within major version 19. Upstream's
75
- `tree-sitter` crate rejects its ABI (`0x5742000c`), and earlier `17.x` and `18.x` `willbooster-tree-sitter` releases
76
- share ABI `0x5742000c` and pass that check, but dereference unused `TSLanguage` tables that `19.1.0` and later omit:
73
+ [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter) `20.0.0` or later within major version 20,
74
+ the runtime this package is tested and fuzzed with. Upstream's `tree-sitter` crate rejects its ABI (`0x5742000c`), and
75
+ earlier `17.x` and `18.x` `willbooster-tree-sitter` releases share ABI `0x5742000c` and pass that check, but
76
+ dereference unused `TSLanguage` tables omitted since `19.1.0`:
77
77
 
78
78
  ```sh
79
- cargo add willbooster-tree-sitter@19.1.1 --rename tree-sitter
79
+ cargo add willbooster-tree-sitter@20.0.0 --rename tree-sitter
80
80
  cargo add willbooster-tree-sitter-rust --rename tree-sitter-rust
81
81
  ```
82
82
 
83
83
  ```rust
84
84
  let mut parser = tree_sitter::Parser::new();
85
85
  parser.set_language(&tree_sitter_rust::LANGUAGE.into())?;
86
+ let tree = parser.parse("fn main() {}\n").unwrap();
86
87
  ```
87
88
 
88
89
  ## Conditional chains
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "18.0.0",
3
+ "version": "19.0.0",
4
4
  "description": "Rust grammar for tree-sitter",
5
5
  "keywords": [
6
- "incremental",
7
6
  "parsing",
8
7
  "rust",
9
8
  "tree-sitter"
@@ -49,7 +48,7 @@
49
48
  "@vitest/browser-playwright": "5.0.5",
50
49
  "@willbooster/oxlint-config": "1.4.9",
51
50
  "@willbooster/wb": "23.3.0",
52
- "@willbooster/web-tree-sitter": "19.1.1",
51
+ "@willbooster/web-tree-sitter": "20.0.0",
53
52
  "conventional-changelog-conventionalcommits": "10.4.1",
54
53
  "lefthook": "2.2.2",
55
54
  "oxlint": "1.90.0",
@@ -61,7 +60,7 @@
61
60
  "wrangler": "4.156.0"
62
61
  },
63
62
  "peerDependencies": {
64
- "@willbooster/web-tree-sitter": "^19.1.1"
63
+ "@willbooster/web-tree-sitter": "^20.0.0"
65
64
  },
66
65
  "peerDependenciesMeta": {
67
66
  "@willbooster/web-tree-sitter": {
Binary file
package/tree-sitter.json CHANGED
@@ -16,7 +16,7 @@
16
16
  }
17
17
  ],
18
18
  "metadata": {
19
- "version": "18.0.0",
19
+ "version": "19.0.0",
20
20
  "license": "MIT",
21
21
  "description": "Rust grammar for tree-sitter",
22
22
  "authors": [