Rust grammar for tree-sitter
Project description
tree-sitter-rust
Rust grammar for tree-sitter.
Features
-
Speed — When initially parsing a file,
tree-sitter-rust
takes 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
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
File details
Details for the file tree_sitter_rust-0.23.1.tar.gz
.
File metadata
- Download URL: tree_sitter_rust-0.23.1.tar.gz
- Upload date:
- Size: 312.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44776cbcbb29cbfca7c753214e90ca069033b3bf164f0231bd064f02352e1433 |
|
MD5 | 77d201c658e1e4a9925b6aabec573591 |
|
BLAKE2b-256 | c1e64ebad320c70d936bc5edcf2ab93ec3981fbb39db38f895b4c0b2de39bdfd |
File details
Details for the file tree_sitter_rust-0.23.1-cp39-abi3-win_arm64.whl
.
File metadata
- Download URL: tree_sitter_rust-0.23.1-cp39-abi3-win_arm64.whl
- Upload date:
- Size: 117.9 kB
- Tags: CPython 3.9+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b5a8e85a6eaee89623aa018c456c1bdafacf4d08836c5096546bac8264427de |
|
MD5 | 98b04b8db4ead0f2c48c65f771df13a4 |
|
BLAKE2b-256 | 4ea2a93c086a5e4050c616b3dd4b6cd9cf6c948ff6fa294ee7451fa7355f307d |
File details
Details for the file tree_sitter_rust-0.23.1-cp39-abi3-win_amd64.whl
.
File metadata
- Download URL: tree_sitter_rust-0.23.1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 119.9 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ce5cf5260e8170e7739db54075cf8778aae480a8e183bf89e57474cc31971f |
|
MD5 | 2fd8469caf5458e4062b9e701de0a76a |
|
BLAKE2b-256 | 180adb505d1ef6ea5e4bf1a71879e0a8b165a7c87998915b00dd7d992ab78d17 |
File details
Details for the file tree_sitter_rust-0.23.1-cp39-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: tree_sitter_rust-0.23.1-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 153.1 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf9f300ab92a6acbb84814bc7a4018edacb1da34ec73a1d77a0945fa709c034 |
|
MD5 | 7c91172a7490c1746fa9b5df203f505e |
|
BLAKE2b-256 | 7515718ac650cd66b3b2f45c8a0ca627bced9f3da288460ea19f1dbbb0f4d22e |
File details
Details for the file tree_sitter_rust-0.23.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: tree_sitter_rust-0.23.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 157.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba19e6070c4e2ce49a4c4571ddd5b267c6f40330ecaf57be07151e60402b4e58 |
|
MD5 | 1f70f55be6e79743d143b6e1fa6dc869 |
|
BLAKE2b-256 | f51f1754084fa83ead2ac41c433b74c6f02e4d1bdc956ed4f437aef0acb5ef55 |
File details
Details for the file tree_sitter_rust-0.23.1-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.23.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 156.2 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/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fbab3c5adb3061c2e04e59f09a0cc12c6f99486ba92933053c49b97fd6785e3 |
|
MD5 | 974e5a7b3adc04430f34e4157192607d |
|
BLAKE2b-256 | c17cbd3f882db9426c880a40b09decf3d68f7468695f761797310965a5e82c51 |
File details
Details for the file tree_sitter_rust-0.23.1-cp39-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tree_sitter_rust-0.23.1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 129.3 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f44abe71d9dd8b43b1a3aa6b042722f60b19aee72a28b003b3282e2a54df5a |
|
MD5 | cfc5b00747877cba278456fac90eb4ac |
|
BLAKE2b-256 | ef48bc9889429ccd76181ec48f6cfef5a7b407679b4a5313f1510562bd87966e |
File details
Details for the file tree_sitter_rust-0.23.1-cp39-abi3-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: tree_sitter_rust-0.23.1-cp39-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 122.0 kB
- Tags: CPython 3.9+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a594ca9f12e0c28f37dcd9a782ae13510ee93d2cd380b58382a4c5da1f84620 |
|
MD5 | b6cb62a08b12b4e94a465fede7e5287f |
|
BLAKE2b-256 | 3e34896b78c238d22005ad5aaacdcebcba194c2e473521d5ad0f46e5d1d2bbd1 |