The contract between a Juno controller and a driver: the types both
sides speak, the proxy contracts a driver implements, the manifest and package formats, and
junodrv to check and build one.
Public, and depends on nothing of Juno's — writing a driver needs access to this repository and nothing else.
Everything you need to write one is at docs.juno.house.
- Start here — a driver end to end
- Connections — relays, contacts, IR, serial
- Runtimes — declarative, WASM, and the host ABI
- Manifest reference — what a package declares
- Proxy reference — every device class, generated from
proxies/*.tomlin this repo
[dependencies]
# Track `main`. This repository carries no tags on purpose: the contracts are still moving, and
# a pin that has to be bumped by hand is a pin that ends up years behind the contracts it
# claims to check. Your `Cargo.lock` records the exact commit.
driver-sdk = { git = "https://github.com/junohouse/driver-sdk", branch = "main" }
[lib]
crate-type = ["cdylib"]
# A driver is downloaded and kept per project, and it spends its time waiting on a device
# rather than in its own code — so build it for size. Worth 30-35% on every certified driver
# measured, with no source change.
[profile.release]
opt-level = "z"
codegen-units = 1
lto = true
strip = truerustup target add wasm32-wasip1
cargo build --release --target wasm32-wasip1It is a sandbox. Your driver cannot open a file or a socket, read a clock, or see another
driver: the controller grants five imports, which is what Rust's std needs to start, report a
panic, and ask for entropy. This costs nothing in practice, because every side effect a driver
has was already a HostCall it returns for the controller to perform.