Metadata-Version: 2.4
Name: codemap-rust
Version: 0.1.0a1
Summary: Rust indexer plugin for CodeMap
Project-URL: Homepage, https://github.com/qxbyte/codemap
Author: CodeMap Contributors
License: MIT
Keywords: codemap,indexer,rust,tree-sitter
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Requires-Dist: codemap-core<0.2,>=0.1.0a1
Requires-Dist: tree-sitter-rust>=0.23
Requires-Dist: tree-sitter>=0.25
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# codemap-rust

> A Rust indexer for [CodeMap](https://github.com/qxbyte/codemap), shipped
> as an independent PyPI package.

## What it captures

Backed by `tree-sitter-rust`:

| AST node | Symbol kind |
|---|---|
| `function_item` (free) | `function` |
| `function_item` (inside `impl`) | `method` (attached to the impl'd type) |
| `function_signature_item` (inside `trait`) | `method` (attached to the trait) |
| `struct_item` | `class` (with `extra.rust_kind=struct`) |
| `enum_item` | `class` (with `extra.rust_kind=enum`) |
| `trait_item` | `class` (with `extra.rust_kind=trait`) |
| `const_item` | `variable` (with `extra.rust_kind=const`) |
| `static_item` | `variable` (with `extra.rust_kind=static`) |

`impl Trait for Type` blocks attach methods to `Type` (the receiver), so
both inherent and trait impls end up addressable under the same
`Type#method()` shape.

## SymbolID encoding

```
scip-rust . . . src/user.rs/User#login().
```

## Install

```bash
pip install "git+https://github.com/qxbyte/codemap.git#subdirectory=plugins/codemap-rust"
```

After install, `codemap doctor` lists `rust` alongside the other
indexers on identical terms (ADR-004 + ADR-L001).

## Limits

* Methods on generic types (`impl<T> Foo<T>`) attach to `Foo` without
  the generic parameter — adequate for code search, lossy for type
  checking.
* Macros are not expanded; their declarations are not captured as
  symbols.
* `mod` declarations are not turned into namespace prefixes; the file
  path is the only namespace.

## License

MIT.
