Project
Code Style
Follow the repo’s current formatting conventions for both Rust and Tea source.
The most important style rules are the Tea ones. If you are writing Tea code, keep it simple, consistent, and easy to scan before worrying about contributor-specific Rust conventions in the repository.
Tea style
Tea source favors a compact, readable style: short blocks, consistent naming, and formatting that stays close to what the language examples already use.
Tea
Recommended conventions
- Use 2-space indentation.
- Prefer
snake_casenames. - End block forms with
end. - Use backticks for interpolation.
When in doubt, format Tea files with the CLI rather than hand-tuning whitespace.
tea fmt .
tea fmt src/main.tea
tea fmt . --checkContributor note
If you are working on the compiler or docs repository itself, follow the
checked-in Rust conventions too: run cargo fmt --all, prefer
anyhow::Result and thiserror patterns, and avoid
.unwrap() outside tests.