BlueGit

timfa posprint

Files

posprint / .cursor / rules / development.mdc

development.mdc

development.mdc 1.2 KiB Download Raw
1---
2description: posprint development conventions
3globs: **/*
4alwaysApply: true
5---
6
7# posprint development rules
8
9## Language and dependencies
10
11- Single language: **Rust** with **egui** (eframe) for the UI.
12- Prefer std library and in-house code. Add a crate only when reimplementing would be unreasonable (e.g. `serialport`, `serde`, `image`, UI framework).
13- Printing: **USB-serial only** in v1. No Bluetooth until explicitly requested.
14
15## Testing
16
17- **Every module must have unit tests** in `#[cfg(test)] mod tests` (or `tests/` for integration).
18- New behavior requires new tests in the same commit.
19- Run `cargo test` before merging; all tests must pass.
20- Use mock transports for printer I/O in tests; never require hardware in CI.
21
22## Branches and commits
23
24- Default branch: `master`.
25- Use `feature/` or `fix/` branches for changes after initial setup.
26- Commit frequently with focused messages; avoid one large commit at the end.
27
28## Documentation
29
30- Keep `docs/HELP.md` in sync with supported DSL and UI features.
31- The in-app Help tab must mirror `docs/HELP.md` (via `include_str!`).
32
33## Releases
34
35- GitLab CI builds Windows (`.exe`/`.msi`) and Linux (`.deb` for apt) artifacts.