---
description: posprint development conventions
globs: **/*
alwaysApply: true
---

# posprint development rules

## Language and dependencies

- Single language: **Rust** with **egui** (eframe) for the UI.
- Prefer std library and in-house code. Add a crate only when reimplementing would be unreasonable (e.g. `serialport`, `serde`, `image`, UI framework).
- Printing: **USB-serial only** in v1. No Bluetooth until explicitly requested.

## Testing

- **Every module must have unit tests** in `#[cfg(test)] mod tests` (or `tests/` for integration).
- New behavior requires new tests in the same commit.
- Run `cargo test` before merging; all tests must pass.
- Use mock transports for printer I/O in tests; never require hardware in CI.

## Branches and commits

- Default branch: `master`.
- Use `feature/` or `fix/` branches for changes after initial setup.
- Commit frequently with focused messages; avoid one large commit at the end.

## Documentation

- Keep `docs/HELP.md` in sync with supported DSL and UI features.
- The in-app Help tab must mirror `docs/HELP.md` (via `include_str!`).

## Releases

- GitLab CI builds Windows (`.exe`/`.msi`) and Linux (`.deb` for apt) artifacts.
