tree-sitter-rust


Nametree-sitter-rust JSON
Version 0.21.2 PyPI version JSON
download
home_pageNone
SummaryRust grammar for tree-sitter
upload_time2024-04-25 15:27:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords incremental parsing tree-sitter rust
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tree-sitter-rust

[![CI][ci]](https://github.com/tree-sitter/tree-sitter-rust/actions/workflows/ci.yml)
[![discord][discord]](https://discord.gg/w7nTvsVJhm)
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-rust)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-rust)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-rust)

Rust grammar for [tree-sitter](https://github.com/tree-sitter/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.

  ```sh
  $ 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](https://doc.rust-lang.org/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](https://doc.rust-lang.org/stable/book/appendix-01-keywords.html) and
  [Operators and Symbols](https://doc.rust-lang.org/stable/book/appendix-02-operators.html).

[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-rust/ci.yml?logo=github&label=CI
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-rust?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-rust?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-rust?logo=pypi&logoColor=ffd242

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tree-sitter-rust",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "incremental, parsing, tree-sitter, rust",
    "author": null,
    "author_email": "Max Brunsfeld <maxbrunsfeld@gmail.com>, Amaan Qureshi <amaanq12@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# tree-sitter-rust\n\n[![CI][ci]](https://github.com/tree-sitter/tree-sitter-rust/actions/workflows/ci.yml)\n[![discord][discord]](https://discord.gg/w7nTvsVJhm)\n[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)\n[![crates][crates]](https://crates.io/crates/tree-sitter-rust)\n[![npm][npm]](https://www.npmjs.com/package/tree-sitter-rust)\n[![pypi][pypi]](https://pypi.org/project/tree-sitter-rust)\n\nRust grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).\n\n## Features\n\n- **Speed** \u2014 When initially parsing a file, `tree-sitter-rust` takes around two to three times\n  as long as rustc's hand-written parser.\n\n  ```sh\n  $ wc -l examples/ast.rs\n    2157 examples/ast.rs\n\n  $ rustc -Z unpretty=ast-tree -Z time-passes examples/ast.rs | head -n0\n    time:   0.002; rss:   55MB ->   60MB (   +5MB)  parse_crate\n\n  $ tree-sitter parse examples/ast.rs --quiet --time\n    examples/ast.rs    6.48 ms        9908 bytes/ms\n  ```\n\n  But if you _edit_ the file after parsing it, tree-sitter can generally _update_\n  the previous existing syntax tree to reflect your edit in less than a millisecond,\n  thanks to its incremental parsing system.\n\n## References\n\n- [The Rust Reference](https://doc.rust-lang.org/reference/) \u2014 While Rust does\n  not have a specification, the reference tries to describe its working in detail.\n  It tends to be out of date.\n- [Keywords](https://doc.rust-lang.org/stable/book/appendix-01-keywords.html) and\n  [Operators and Symbols](https://doc.rust-lang.org/stable/book/appendix-02-operators.html).\n\n[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-rust/ci.yml?logo=github&label=CI\n[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord\n[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix\n[npm]: https://img.shields.io/npm/v/tree-sitter-rust?logo=npm\n[crates]: https://img.shields.io/crates/v/tree-sitter-rust?logo=rust\n[pypi]: https://img.shields.io/pypi/v/tree-sitter-rust?logo=pypi&logoColor=ffd242\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rust grammar for tree-sitter",
    "version": "0.21.2",
    "project_urls": {
        "Homepage": "https://github.com/tree-sitter/tree-sitter-rust"
    },
    "split_keywords": [
        "incremental",
        " parsing",
        " tree-sitter",
        " rust"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07c5d6c7cf40ebce008bfaa3303d99e85615f13eec77c52cbd2e6126f978fced",
                "md5": "5344bb977f15582bf956f06561f2ab17",
                "sha256": "483591f17117fe802aa679fc058937be025b76a89bf17a82ccb462ce032c143e"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5344bb977f15582bf956f06561f2ab17",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 124196,
            "upload_time": "2024-04-25T15:27:09",
            "upload_time_iso_8601": "2024-04-25T15:27:09.852031Z",
            "url": "https://files.pythonhosted.org/packages/07/c5/d6c7cf40ebce008bfaa3303d99e85615f13eec77c52cbd2e6126f978fced/tree_sitter_rust-0.21.2-cp38-abi3-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43292e714b8446e74aea289e6570c6983449a262d571dac9813659f3320f146c",
                "md5": "63ada7ae63a25616968f392521f9400d",
                "sha256": "635b3781a9c44211b49950feabd081f3096dbd55b1f50fe7451a7f46d6d28f81"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "63ada7ae63a25616968f392521f9400d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 129949,
            "upload_time": "2024-04-25T15:27:11",
            "upload_time_iso_8601": "2024-04-25T15:27:11.525685Z",
            "url": "https://files.pythonhosted.org/packages/43/29/2e714b8446e74aea289e6570c6983449a262d571dac9813659f3320f146c/tree_sitter_rust-0.21.2-cp38-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1539545bce3106cc369b719f6c8780b1a941837d33bf0397dc65caaa6b703328",
                "md5": "af12c1876ae724e6ad5e2098470d45a6",
                "sha256": "50f2ec41d8c1beda3c2d2765083d02c16f29bfab9d6269ac1387fa40f017f3b0"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "af12c1876ae724e6ad5e2098470d45a6",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 157357,
            "upload_time": "2024-04-25T15:27:13",
            "upload_time_iso_8601": "2024-04-25T15:27:13.145601Z",
            "url": "https://files.pythonhosted.org/packages/15/39/545bce3106cc369b719f6c8780b1a941837d33bf0397dc65caaa6b703328/tree_sitter_rust-0.21.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "debce462de2af3be3997541f4db4d2f938f8d841a21874766a8d5a0247d07049",
                "md5": "dbed7c1f7b07b12dbd1b219b776c48b8",
                "sha256": "28c3ee2d21850e5b14289e1d4569b8770983af20f2575d2e2a3e1eeed3fc3c4c"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "dbed7c1f7b07b12dbd1b219b776c48b8",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 156204,
            "upload_time": "2024-04-25T15:27:14",
            "upload_time_iso_8601": "2024-04-25T15:27:14.157293Z",
            "url": "https://files.pythonhosted.org/packages/de/bc/e462de2af3be3997541f4db4d2f938f8d841a21874766a8d5a0247d07049/tree_sitter_rust-0.21.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b71d373fad83417d4329ea186d171b8964d3ec5a2d5b9661b65eb0d4807d021e",
                "md5": "5651a76e7ad079e2475ff324042f444f",
                "sha256": "ed32387af91b37c6e592a34d4eb9fc935231a3ba8ba1ef52547c48fa0d20e249"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-musllinux_1_1_aarch64.whl",
            "has_sig": false,
            "md5_digest": "5651a76e7ad079e2475ff324042f444f",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 159749,
            "upload_time": "2024-04-25T15:27:15",
            "upload_time_iso_8601": "2024-04-25T15:27:15.422450Z",
            "url": "https://files.pythonhosted.org/packages/b7/1d/373fad83417d4329ea186d171b8964d3ec5a2d5b9661b65eb0d4807d021e/tree_sitter_rust-0.21.2-cp38-abi3-musllinux_1_1_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88e2efb1768868428a034fc1d2edc600b44ccfe8eb11bd0602e93a655c168487",
                "md5": "b60acd7059c298948a07b348c78a7862",
                "sha256": "efd0f28f3da2a3341c0a2dd15410319b6d553b0b3900471a14c781d0833bd8eb"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-musllinux_1_1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b60acd7059c298948a07b348c78a7862",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 159494,
            "upload_time": "2024-04-25T15:27:16",
            "upload_time_iso_8601": "2024-04-25T15:27:16.453343Z",
            "url": "https://files.pythonhosted.org/packages/88/e2/efb1768868428a034fc1d2edc600b44ccfe8eb11bd0602e93a655c168487/tree_sitter_rust-0.21.2-cp38-abi3-musllinux_1_1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbcc4e39c2d7acf66c3e8dedf86f5b99fd44e951ebf5f735ca7f166273f1216e",
                "md5": "9fee9ae090290a6a22d026bcf71cdabf",
                "sha256": "2637441981531ab72b580fb567b0c65a61e59de337f2d5a02347269266ab9913"
            },
            "downloads": -1,
            "filename": "tree_sitter_rust-0.21.2-cp38-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "9fee9ae090290a6a22d026bcf71cdabf",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 119740,
            "upload_time": "2024-04-25T15:27:17",
            "upload_time_iso_8601": "2024-04-25T15:27:17.979939Z",
            "url": "https://files.pythonhosted.org/packages/cb/cc/4e39c2d7acf66c3e8dedf86f5b99fd44e951ebf5f735ca7f166273f1216e/tree_sitter_rust-0.21.2-cp38-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-25 15:27:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tree-sitter",
    "github_project": "tree-sitter-rust",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tree-sitter-rust"
}
        
Elapsed time: 0.24730s