Metadata-Version: 2.4
Name: rbtr-lang-rust
Version: 2026.9.0.dev3
Summary: rbtr — Rust language plugin
Keywords: code-search,code-index,tree-sitter,static-analysis,semantic-search,developer-tools,rust
Author: Alejandro Giacometti
Author-email: Alejandro Giacometti <alejandro.giacometti@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Requires-Dist: rbtr==2026.9.0.dev3
Requires-Dist: tree-sitter-rust
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/janrito/rbtr
Project-URL: Repository, https://github.com/janrito/rbtr
Project-URL: Documentation, https://github.com/janrito/rbtr/tree/main/packages/rbtr-lang-rust#readme
Project-URL: Issues, https://github.com/janrito/rbtr/issues
Project-URL: Changelog, https://github.com/janrito/rbtr/releases
Description-Content-Type: text/markdown

# rbtr-lang-rust

Rust support for [rbtr]. Optional plugin — install with
`pip install rbtr[rust]`.

[rbtr]: https://github.com/janrito/rbtr/tree/main/packages/rbtr#readme

## What it ingests

- **Functions & methods** — `fn`; functions inside an `impl` are methods
  scoped to the type.
- **Classes** — `struct`, `enum`, `trait`, and `impl` blocks (an `impl Svc`
  and `struct Svc` both yield a `Svc` class chunk).
- **Variables** — module-level `const` / `static`.
- **Imports** — `use` declarations (scoped paths resolved), for cross-file
  edges.
- **Attributes** — `#[derive(...)]`, `#[serde(...)]` and the rest fold into
  the item below them, so a type is findable by the traits it derives. A
  module-level `#![allow(...)]`, with no item under it, is its own chunk.

Leading `///` / `//!` doc comments fold into the symbol's content, together
with any attribute between the comment and the item.

## Chunks produced

```rust
fn greet(name: &str) -> String { … }   // function "greet"
struct Server { … }                    // class "Server"
impl Server { fn start(&self) {} }     // class "Server"; method "start", scope "Server"
const MAX: u32 = 100;                  // variable "MAX"
use crate::config::Config;             // import, metadata {module: crate::config::Config}
```

## Embedded / injected chunks

None. Rust does not embed other languages.

## Grammar & dependencies

Uses the `tree-sitter-rust` grammar. No dependency on other language plugins.
