Rust grammar for tree-sitter
Project description
tree-sitter-rust
Rust grammar for tree-sitter.
Features
-
Speed — When initially parsing a file,
tree-sitter-rusttakes around two to three times as long as rustc's hand-written parser.$ wc -l examples/ast.rs 2157 examples/ast.rs $ rustc -Z unpretty=ast-tree -Z time-passes examples/ast.rs | head -n0 time: 0.002; rss: 55MB -> 60MB ( +5MB) parse_crate $ tree-sitter parse examples/ast.rs --quiet --time examples/ast.rs 6.48 ms 9908 bytes/ms
But if you edit the file after parsing it, tree-sitter can generally update the previous existing syntax tree to reflect your edit in less than a millisecond, thanks to its incremental parsing system.
References
- The Rust Reference — While Rust does not have a specification, the reference tries to describe its working in detail. It tends to be out of date.
- Keywords and Operators and Symbols.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tree_sitter_rust-0.24.0.tar.gz.
File metadata
- Download URL: tree_sitter_rust-0.24.0.tar.gz
- Upload date:
- Size: 335.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7185f482717bd41f24ffcd90b5ee24e7e0d6334fecce69f1579609994cd599d
|
|
| MD5 |
9ad36afd739e7cce0e42485826440644
|
|
| BLAKE2b-256 |
8aaefde1ab896f3d79205add86749f6f443537f59c747616a8fc004c7a453c29
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-win_arm64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-win_arm64.whl
- Upload date:
- Size: 128.6 kB
- Tags: CPython 3.9+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a0538eaf4063b443c6cd80a47df19249f65e27dbdf129396a9193749912d0c0
|
|
| MD5 |
507ac61537a2c4a67784e094c8553e1a
|
|
| BLAKE2b-256 |
c83370b320d24cd127d6ca427d2bef1279830f0786a1f2cde160f59b4fb80728
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 130.1 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e29be0292eaf1f99389b3af4281f92187612af31ba129e90f4755f762993441
|
|
| MD5 |
dedf14fe7adc88876292a42f535def81
|
|
| BLAKE2b-256 |
b9dfa6321043d6dee313e5fa3b6a13384119d590393368134cf12f2ee7f9e664
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 162.9 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
615f989241b717f14105b1bc621ff0c2200c86f1c3b36f1842d61f6605021152
|
|
| MD5 |
56300a34f8f5f97a985097c8a21b9569
|
|
| BLAKE2b-256 |
74d1389eecb15c3f8ef4c947fcfbcc794ef4036b3b892c0f981e110860371daa
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 166.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3362992ea3150b0dd15577dd59caef4f2926b6e10806f2bb4f2533485acee2f
|
|
| MD5 |
738b658ccb70441901bfec90f583781d
|
|
| BLAKE2b-256 |
f34dc5eb85a68a2115d9f5c23fa5590a28873c4cf3b4e17c536ff0cb098e1a91
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 165.5 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf2c1f4b87df568352a9e523600af7cb32c5748dc75275f4794d6f811ab13dfe
|
|
| MD5 |
7b475e02b85e503ab98154c939d35661
|
|
| BLAKE2b-256 |
ba728ee8cf2bd51bc402531da7d8741838a4ea632b46a8c1e2df9968c7326cc7
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 137.9 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0a1a2694117a0e86e156b28ee7def810ec94e52402069bf805be22d43e3c1a1
|
|
| MD5 |
3d72583fb19dd4eacb8afd16c0a0a1ba
|
|
| BLAKE2b-256 |
bf004c400fe94eb3cb141b008b489d582dcd8b41e4168aca5dd8746c47a2b1bc
|
File details
Details for the file tree_sitter_rust-0.24.0-cp39-abi3-macosx_10_9_x86_64.whl.
File metadata
- Download URL: tree_sitter_rust-0.24.0-cp39-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 131.9 kB
- Tags: CPython 3.9+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ea455443f5ab245afd8c5ce63a8ae38da455ef27437b459ce3618a9d4ec4f9a
|
|
| MD5 |
99611cb09a4112efb4fee548887edba6
|
|
| BLAKE2b-256 |
3c290594a6b135d2475d1bb8478029dad127b87856eeb13b23ce55984dd22bb4
|