Skip to main content

Rust grammar for tree-sitter

Project description

tree-sitter-rust

CI discord matrix crates npm pypi

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

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

tree_sitter_rust-0.24.1.tar.gz (338.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_rust-0.24.1-cp39-abi3-win_arm64.whl (129.3 kB view details)

Uploaded CPython 3.9+Windows ARM64

tree_sitter_rust-0.24.1-cp39-abi3-win_amd64.whl (130.7 kB view details)

Uploaded CPython 3.9+Windows x86-64

tree_sitter_rust-0.24.1-cp39-abi3-musllinux_1_2_x86_64.whl (163.4 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

tree_sitter_rust-0.24.1-cp39-abi3-musllinux_1_2_aarch64.whl (169.9 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

tree_sitter_rust-0.24.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (171.4 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

tree_sitter_rust-0.24.1-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (165.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_rust-0.24.1-cp39-abi3-macosx_11_0_arm64.whl (137.7 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tree_sitter_rust-0.24.1-cp39-abi3-macosx_10_9_x86_64.whl (130.4 kB view details)

Uploaded CPython 3.9+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_rust-0.24.1.tar.gz.

File metadata

  • Download URL: tree_sitter_rust-0.24.1.tar.gz
  • Upload date:
  • Size: 338.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tree_sitter_rust-0.24.1.tar.gz
Algorithm Hash digest
SHA256 ed8a2f71ac2cb859d2201efb124f04a53bf9c7aa105ef4962fe3e3ba74ea2af9
MD5 b1b03afad70622cf21876e1cc98590cf
BLAKE2b-256 136b20fcc994639fbf5ecc34006b4238ce8be287fc20f5b6f2772a1918d8a7d7

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 4a89771a0463dcefd8c1850eeab82185e0b22aaf4dde14ba56b138c400438622
MD5 e24baf848d9c05f7394326453242172b
BLAKE2b-256 8e08269f090dced916f032bc84e6ba7474f56f2b33a96acc38e435f307adc1c0

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 78c72c85d88496a702c86610dadfed0af014d508134ca66896b2ea0baf7557eb
MD5 cde71210359754bffda71e7fba6f0606
BLAKE2b-256 0b4994a55f2c2fa397a760bbe17eb7df38043545ff7ed7b6b1555d01ea8a3693

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5def913248e9f2b0bf4d402b281cdfcecaad09a60ca3541ff49901fc9195b0ee
MD5 cae22b2a8c1e05d196ffef3eaa3da159
BLAKE2b-256 0255d66270ede3a572c88d8c5169c14cb5a5ef1d5ee41fb73fe3beb16ed68107

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4e2bca06ebc60c3f10b0a9481752eb54364d3d9896beb5c9d6911f8b87c024b3
MD5 23e82fe10b160ed572140c5d1e65f050
BLAKE2b-256 c8e31183ff4af2e21df905378c6e1b9d7d8d44f830d99d3725b8be38d760983e

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1e464ca5bc0228c2bc82e851a2f0e2b008cd98b0520c751ff94f0e9ca30072eb
MD5 df71e54a87a1fc6db611acb52bbb17b9
BLAKE2b-256 3e053afa2fb2f39375a56ae95ff732d50831eeb756f47e6e143fcdadf3fe99f2

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 916cc9c29176790d03f03a58135ca28b5f07e9cb11f5c4d2436ef9b2162b6e38
MD5 bf9cf21602d68d4dbf26e323b5dcf220
BLAKE2b-256 193a86417abd899f4fb465b7e5abc25f0fc5fac11dfdbbb8f2d7f63825fa521c

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76d726c56f0a249c2b570e37dbb7bbeec7fb50a3969b824d8bde2fd3cddc3715
MD5 7c53631f2a83b88bb2f57ed92b20d626
BLAKE2b-256 76be9b45c2f4b72dc022df7016a0395aea2b7a5575611401786f60a01d803292

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.1-cp39-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.1-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aa99841370343fd5a28e2b4fc8b794da2323bc12ef6a1888f2d160c766e188a9
MD5 520f244085037566ba721b854b4b1c26
BLAKE2b-256 54c2a1a9817ac58cebfbf2e3f0c28952c7d902d1accb652bd4da8b900dad4be4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page