posprint
Cross-platform designer for POS (point-of-sale) receipt documents. Edit templates in a markdown-like syntax, preview output live, substitute runtime parameters, and print directly to USB or Bluetooth thermal printers via raw ESC/POS bytes.
Target platforms: Windows and Linux (x64).
Status
v0.1.0 MVP — Rust + egui app with editor, preview, help, .pos files, parameters, and USB-serial printing.
Build and run
cargo test # 20 unit tests
cargo run # launch the designer
cargo build --release
Linux: add your user to the dialout group for USB-serial printer access.
Releases (GitLab CI)
| Platform | Artifact | Install |
|---|---|---|
| Linux | .deb (amd64) | sudo dpkg -i posprint_*_amd64.deb then sudo apt-get install -f |
| Windows | posprint.exe | Download from GitLab release job artifacts |
Tag a version (e.g. v0.1.0) to trigger release builds.
Features
- Markdown-like template editor with live preview
- Page width: auto-scale or fixed width (mm)
- Save and load
.posfiles - Parameter tokens (
${DocumentNumber}) with print-time popup and value reuse - Barcodes, QR codes, and images (including parameterized content)
- Print to USB-serial POS printers via raw ESC/POS bytes
- In-app Help tab (from docs/HELP.md)
Dependencies (minimal)
| Crate | Why |
|---|---|
eframe / egui | Native UI |
serde / serde_json | .pos file format |
serialport | USB-serial printer I/O |
image | Load PNG/JPEG for @image |
rfd | Native open/save dialogs |
ESC/POS encoding is implemented in-tree.
Design documents
| Document | Description |
|---|---|
| FEASIBILITY.md | Feasibility assessment, complexity estimate, risks |
| LANGUAGE-CHOICE.md | Language and framework recommendation |
| ARCHITECTURE.md | System architecture and module breakdown |
| DSL-SPEC.md | Document markup language (.pos body syntax) |
| FILE-FORMAT.md | .pos file envelope (metadata + body) |
| PRINTING.md | Printer discovery, transport, ESC/POS pipeline |
Planned features
- Bluetooth printer support (deferred)
Quick feasibility summary
Verdict: feasible for a small team or solo developer, with the printing layer as the main engineering risk.
| Area | Complexity | Notes |
|---|---|---|
| Editor + preview UI | Medium | Well-trodden path |
| DSL parser + renderer | Medium | Custom grammar, bounded scope |
| Parameters | Low | Straightforward substitution |
| Barcodes / QR / images | Low–Medium | Mature libraries exist |
| USB / BT printer I/O | High | OS differences, device quirks |
| Overall (MVP) | Medium–High | ~6–10 weeks for one experienced dev |
Stack: Rust + egui (single language, minimal dependencies). USB-serial printing only in v1. See LANGUAGE-CHOICE.md and docs/HELP.md.
Source
| 1 | # posprint |
| 2 | |
| 3 | Cross-platform designer for POS (point-of-sale) receipt documents. Edit templates in a markdown-like syntax, preview output live, substitute runtime parameters, and print directly to USB or Bluetooth thermal printers via raw ESC/POS bytes. |
| 4 | |
| 5 | **Target platforms:** Windows and Linux (x64). |
| 6 | |
| 7 | ## Status |
| 8 | |
| 9 | **v0.1.0 MVP** — Rust + egui app with editor, preview, help, `.pos` files, parameters, and USB-serial printing. |
| 10 | |
| 11 | ## Build and run |
| 12 | |
| 13 | ```bash |
| 14 | cargo test # 20 unit tests |
| 15 | cargo run # launch the designer |
| 16 | cargo build --release |
| 17 | ``` |
| 18 | |
| 19 | **Linux:** add your user to the `dialout` group for USB-serial printer access. |
| 20 | |
| 21 | ## Releases (GitLab CI) |
| 22 | |
| 23 | | Platform | Artifact | Install | |
| 24 | |----------|----------|---------| |
| 25 | | Linux | `.deb` (amd64) | `sudo dpkg -i posprint_*_amd64.deb` then `sudo apt-get install -f` | |
| 26 | | Windows | `posprint.exe` | Download from GitLab release job artifacts | |
| 27 | |
| 28 | Tag a version (e.g. `v0.1.0`) to trigger release builds. |
| 29 | |
| 30 | ## Features |
| 31 | |
| 32 | - Markdown-like template editor with live preview |
| 33 | - Page width: auto-scale or fixed width (mm) |
| 34 | - Save and load `.pos` files |
| 35 | - Parameter tokens (`${DocumentNumber}`) with print-time popup and value reuse |
| 36 | - Barcodes, QR codes, and images (including parameterized content) |
| 37 | - Print to USB-serial POS printers via raw ESC/POS bytes |
| 38 | - In-app **Help** tab (from [docs/HELP.md](docs/HELP.md)) |
| 39 | |
| 40 | ## Dependencies (minimal) |
| 41 | |
| 42 | | Crate | Why | |
| 43 | |-------|-----| |
| 44 | | `eframe` / `egui` | Native UI | |
| 45 | | `serde` / `serde_json` | `.pos` file format | |
| 46 | | `serialport` | USB-serial printer I/O | |
| 47 | | `image` | Load PNG/JPEG for `@image` | |
| 48 | | `rfd` | Native open/save dialogs | |
| 49 | |
| 50 | ESC/POS encoding is implemented in-tree. |
| 51 | |
| 52 | ## Design documents |
| 53 | |
| 54 | | Document | Description | |
| 55 | |----------|-------------| |
| 56 | | [FEASIBILITY.md](docs/FEASIBILITY.md) | Feasibility assessment, complexity estimate, risks | |
| 57 | | [LANGUAGE-CHOICE.md](docs/LANGUAGE-CHOICE.md) | Language and framework recommendation | |
| 58 | | [ARCHITECTURE.md](docs/ARCHITECTURE.md) | System architecture and module breakdown | |
| 59 | | [DSL-SPEC.md](docs/DSL-SPEC.md) | Document markup language (`.pos` body syntax) | |
| 60 | | [FILE-FORMAT.md](docs/FILE-FORMAT.md) | `.pos` file envelope (metadata + body) | |
| 61 | | [PRINTING.md](docs/PRINTING.md) | Printer discovery, transport, ESC/POS pipeline | |
| 62 | |
| 63 | ## Planned features |
| 64 | |
| 65 | - Bluetooth printer support (deferred) |
| 66 | |
| 67 | ## Quick feasibility summary |
| 68 | |
| 69 | **Verdict: feasible** for a small team or solo developer, with the printing layer as the main engineering risk. |
| 70 | |
| 71 | | Area | Complexity | Notes | |
| 72 | |------|------------|-------| |
| 73 | | Editor + preview UI | Medium | Well-trodden path | |
| 74 | | DSL parser + renderer | Medium | Custom grammar, bounded scope | |
| 75 | | Parameters | Low | Straightforward substitution | |
| 76 | | Barcodes / QR / images | Low–Medium | Mature libraries exist | |
| 77 | | USB / BT printer I/O | **High** | OS differences, device quirks | |
| 78 | | **Overall (MVP)** | **Medium–High** | ~6–10 weeks for one experienced dev | |
| 79 | |
| 80 | Stack: **Rust + egui** (single language, minimal dependencies). USB-serial printing only in v1. See [LANGUAGE-CHOICE.md](docs/LANGUAGE-CHOICE.md) and [docs/HELP.md](docs/HELP.md). |