Adding a driver
How a new watch protocol lands in Blerivo.
A driver is a protocol module in the Rust core plus its session, exposed through every SDK.
Where the pieces live
| Piece | Path |
|---|---|
| Codecs and the session | crates/core/src/<protocol>/, with the session implementing the Session trait from crates/core/src/session.rs |
| The constructor every SDK sees | crates/ffi/src/drivers.rs |
| Flutter mirror | packages/flutter/rust/src/api |
| React Native bindings | Regenerated with pnpm --filter react-native-blerivo run generate |
Rules
- Follow the clean room rules.
- Test protocol code against byte fixtures; each test checks one behaviour with one assertion.
- Keep each pull request to one logical change and write one-line Conventional Commit subjects, for example
feat(core): decode moyoung sleep records. - Run
pnpm run cibefore you push.
Stub
A walkthrough from a first frame codec to a finished session is still to be written.
To ask for a watch instead, open a device request.