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.2.tar.gz (339.3 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.2-cp39-abi3-win_arm64.whl (128.2 kB view details)

Uploaded CPython 3.9+Windows ARM64

tree_sitter_rust-0.24.2-cp39-abi3-win_amd64.whl (129.4 kB view details)

Uploaded CPython 3.9+Windows x86-64

tree_sitter_rust-0.24.2-cp39-abi3-musllinux_1_2_x86_64.whl (162.4 kB view details)

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

tree_sitter_rust-0.24.2-cp39-abi3-musllinux_1_2_aarch64.whl (168.7 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

tree_sitter_rust-0.24.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (170.3 kB view details)

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

tree_sitter_rust-0.24.2-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (164.7 kB view details)

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

tree_sitter_rust-0.24.2-cp39-abi3-macosx_11_0_arm64.whl (136.8 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tree_sitter_rust-0.24.2-cp39-abi3-macosx_10_9_x86_64.whl (129.5 kB view details)

Uploaded CPython 3.9+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: tree_sitter_rust-0.24.2.tar.gz
  • Upload date:
  • Size: 339.3 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.2.tar.gz
Algorithm Hash digest
SHA256 54fb02a5911e345308b405174465112479f56dc39e3f1e7744d7568595f00db9
MD5 242d2ee3b65d13bb543f2948460ba46e
BLAKE2b-256 b78775cbd22b927267d310f76cca1ab3c1d9d41035dfa3eb9cc95f96ee199440

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 66ba90f61bd54f4c4f5d30434957daf64507c16b0313df76becb37d63f70a227
MD5 f5cc94a9285d6ead137064667fc2dd36
BLAKE2b-256 b9d8050a781172745bc345f98abb7c56e72022ea0790f8e793de981c83c2ef15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4529c125d928882ddfb879fdc6bc0704913261ecc078b6fa7902559e0daf200d
MD5 3dc14ff6b76baabff8e44ccbc9d5878c
BLAKE2b-256 34717ef609894dbfe5699eb16f7471f9b8af1d958d8ba3e29c238d7607e8cb47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 da2b86099028fd42c6cd32878b7b16b01f8aac0f7b0e98742b7fa6bc3cf09b89
MD5 4d8bc2c9499bd87cc932946a62d7eb91
BLAKE2b-256 a2e13519f866a4679ca36acd9f5a06a779ecb8a92b18887c5546458d521df557

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 87930163a462408c49ab62c667e74029bc26b4cc7123dd1bdc7352215786c64a
MD5 1b54190cdba65e95561a77647fded0bc
BLAKE2b-256 95a8f85b1ca75e01361ca5f92d226593ca4857cea49551b9f6c8fa6fc08ea917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9d76d1208c3638b871236090759dfc13d478921320653a6c9da5336e7c58f65a
MD5 17707d35b7ed1e987e27cca3ce5c572f
BLAKE2b-256 b5f6a5a146df5c0a5daea3ffcd5d7245775fe7f084357770d5a313dd6245ae78

See more details on using hashes here.

File details

Details for the file tree_sitter_rust-0.24.2-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.2-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e033c5a93b57c88e0a835880de39fc802909ff69f57aaff6000211c196ea5190
MD5 e22bd00953701baf09960fa78ca7ddb1
BLAKE2b-256 ca45a051bbd3045a61182dde25b93ae9a33d2677c935b16952283e12eaf46051

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01a46622735498493f29f3e628a90de95c96a07bfbeb88996243eb986b1cee36
MD5 c873235286568e29f2fa3a997c9f141e
BLAKE2b-256 782acf39f881a545360b5a86bb1accba1f4acc713daab01fb9edd35b6e84f473

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_rust-0.24.2-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3620cfd12340efa43082d45df76349ff511893a9c361da2f8d6d51e307020a59
MD5 862b3f765db66135b3dfb095a437389c
BLAKE2b-256 d0242b2d33af5e27c84a4fde4e8cd2594bb4ab1e1cf48756a9f40dadc84956cc

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