25 lines
573 B
Markdown
25 lines
573 B
Markdown
---
|
|
applyTo: "**"
|
|
---
|
|
|
|
# Rust Project Guidelines
|
|
|
|
## Project Structure
|
|
|
|
- Crate names should be consistent and use a common prefix if part of a workspace.
|
|
Example: `deepwiki-core`
|
|
- When using `format!`, always inline variables into `{}` directly.
|
|
|
|
## Code Formatting and Linting
|
|
|
|
- Always run `cargo fmt` after making code changes. Do not request approval for formatting.
|
|
|
|
- Run tests after fixes
|
|
|
|
## Tests
|
|
|
|
### General
|
|
|
|
- Always add tests for new functionality.
|
|
- Use [`pretty_assertions::assert_eq`](https://docs.rs/pretty_assertions) for better diff output in tests.
|