Lemnos is a Rust workspace for hardware discovery, driver matching, and runtime interaction across GPIO, PWM, I2C, SPI, UART, and USB surfaces.
The repository is split into small crates so applications, custom drivers, Linux backends, built-in generic drivers, and test helpers can evolve independently.
crates/lemnos: consumer-facing facade and builder APIcrates/lemnos-core: shared types, requests, state, and descriptorscrates/lemnos-bus: typed bus/session traits for hardware accesscrates/lemnos-discovery: discovery probes, inventory snapshots, and diffingcrates/lemnos-driver-manifest: driver metadata and matching rulescrates/lemnos-driver-sdk: driver authoring helpers and bind-time utilitiescrates/lemnos-registry: driver registration, ranking, and selectioncrates/lemnos-runtime: embeddable runtime for refresh, bind, and statecrates/lemnos-linux: Linux discovery and transport backendscrates/lemnos-drivers-*: built-in generic drivers for common bus classescrates/lemnos-macros: proc macros for configured devices and driver boilerplatecrates/lemnos-mock: fake hardware for tests and examples
Additional repository notes live under docs/README.md.
Add the facade crate for most applications:
[dependencies]
lemnos = "1.0.0"Typical feature sets:
builtin-drivers: bundles the generic GPIO/PWM/I2C/SPI/UART/USB driverslinux: enables the Linux backend and Linux-specific feature flagsmacros: re-exportslemnos-macrosmock: enables mock hardware support for tests and examplestokio: enables the async runtime surfacefull: enables the common bundled experience
Example:
[dependencies]
lemnos = { version = "1.0.0", features = ["builtin-drivers", "linux", "macros"] }The facade crate includes examples for both mock and Linux-backed flows:
cargo run -p lemnos --example mock_gpio --features "mock builtin-drivers"cargo run -p lemnos --example mock_gpio_async --features "mock builtin-drivers tokio"cargo run -p lemnos --example linux_led_class_driver --features "linux"cargo run -p lemnos --example linux_device_validator --features "builtin-drivers linux macros"
Common workspace commands:
./scripts/repo-clean.sh
./scripts/check-file-sizes.sh
cargo test --workspace
cargo clippy --workspace --all-targets --all-features
cargo doc --workspace --no-depsTargeted helper scripts live under testing/.
- docs/README.md: repo documentation index
- docs/development.md: repo layout, commands, and validation conventions
- docs/architecture-crate-map.md: crate responsibilities and relationships
- docs/testing.md: test surfaces, scripts, and example validation flows
- CHANGELOG.md: release history and notable workspace changes
- testing/README.md: local and CI validation entry points
- scripts/ci.sh: shared local CI entry point
- scripts/repo-clean.sh: pre-commit cleanup and verification entry point
Licensed under either:
- Apache-2.0
- MIT
at your option.