| 1 |
# Contributing |
| 2 |
|
| 3 |
## Layout |
| 4 |
|
| 5 |
- `src/lib.rs` — public re-exports. |
| 6 |
- `src/client.rs` — `Supernote` struct and its methods. |
| 7 |
- `src/discover.rs` — mDNS discovery. |
| 8 |
- `src/browse.rs` — Browse & Access wire format. Every assumption about the |
| 9 |
device's HTTP surface lives here; nothing else in the crate should encode |
| 10 |
Ratta-specific quirks. |
| 11 |
- `src/error.rs` — the `Error` enum. |
| 12 |
|
| 13 |
## Style |
| 14 |
|
| 15 |
- Rust 2024 edition. |
| 16 |
- Sync API (`ureq` + `mdns-sd` blocking). Async callers wrap with |
| 17 |
`tokio::task::spawn_blocking`. |
| 18 |
- No panics in library code; return `Result<T, Error>`. |
| 19 |
- No emoji in any output, doc, or comment. |
| 20 |
|
| 21 |
## Reconnaissance |
| 22 |
|
| 23 |
Wire-format details (listing JSON shape, PUT semantics, passcode header) |
| 24 |
were pinned by `curl` against a real device with Wi-Fi Transfer enabled. |
| 25 |
When a new firmware ships and something breaks, the fix belongs in |
| 26 |
`browse.rs`. Record the firmware version and the change in `CHANGELOG.md`. |
| 27 |
|
| 28 |
## Tests |
| 29 |
|
| 30 |
Unit tests live alongside their module. Integration tests that need a |
| 31 |
real device go under `tests/` and are gated on the `SUPERNOTE_HOST` |
| 32 |
environment variable. |
| 33 |
|