lib-device provides typed device-binding descriptors and validation helpers shared by device-management services and driver tests.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen 2b67b1c722
All checks were successful
CI / markdown (push) Successful in 18s
CI / test (push) Successful in 1m58s
feat: Clarify device descriptions and activation authority
Integrate the human-reviewed change from lib-device#5.
2026-11-12 18:55:38 +02:00
.github ci: Declare policy helper and output boundaries 2026-11-07 18:20:31 +02:00
src feat: classify the CMOS RTC device 2026-09-02 21:26:11 +03:00
.editorconfig Initial commit 2026-03-07 11:22:06 +01:00
.gitignore Ignore local .ci workspace 2026-04-15 21:52:48 +03:00
.markdownlint-cli2.yaml Tighten CI markdown policy 2026-05-22 15:10:17 +03:00
ARCHITECTURE.md feat: classify the CMOS RTC device 2026-09-02 21:26:11 +03:00
Cargo.toml refactor: remove unused driver slot helper 2026-07-26 07:35:19 +03:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:15 +03:00
CONTRIBUTING.md docs: Align dependency selection and review policy 2026-10-30 19:15:24 +02:00
LICENSE Initial commit 2026-03-07 11:22:06 +01:00
README.md docs: Clarify device descriptions and activation authority 2026-10-30 19:15:24 +02:00
ROADMAP.md feat: classify the CMOS RTC device 2026-09-02 21:26:11 +03:00
rustfmt.toml lib-device: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:53 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:15 +03:00

lib-device

lib-device provides typed device-discovery descriptors, activation policy, identity constants, and validation helpers shared by device-management services and driver tests.

EriX is a clean-room, capability-based microkernel operating system written entirely in Rust.

Technical requirements are tracked in the EriX requirements, conventions, and project documentation.

See:

  • docs for design documents, specifications, and development plans.
  • Related architecture repositories for kernel, services, libraries, drivers, and integration tooling.

Purpose of This Repository

lib-device defines discovery descriptors, driver-interface classes and activation metadata shared by EriX services. The library validates descriptive records; services decide whether to activate a driver through their separately held capabilities.

The maintained responsibilities are:

  • expose the lib-device crate API for device behavior used by dependent components
  • keep data formats, constants, and validation helpers documented and tested
  • preserve clean-room, no-external-crate implementation boundaries
  • coordinate pre-alpha API cleanup with downstream repositories

Clean-Room Policy

EriX follows a strict clean-room philosophy:

  • No external source code may be copied.
  • No external Rust crates are allowed.
  • No code generation tools that embed third-party code.
  • All code must be authored within the project.

Violations will result in rejection of the contribution.

License

All EriX repositories are licensed under the ISC License.

Development Model

EriX development is modular, deterministic, reproducible, authority-explicit, security-first, and self-hosting oriented.

This repository follows the project roadmap and the validation rules documented in its own roadmap.

Canonical ACPI hardware identifiers are constructed from validated ASCII and expose only their read-only padded representation. Discovery records contain no reserved future flags. Seeded device identifiers name activation policy; location-derived physical identifiers name discovered PCI functions. The library provides checked conversion helpers between a virtio-block policy and its bus/device/function identity without carrying hardware authority. The canonical RTC_CMOS interface class and VM-seeded RTC device identifier let BootConfig and deviced agree on the private one-shot driver without embedding a capability, port, executable path, or process handle in this crate.

Build and test

cargo build --all-targets --all-features
cargo test --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings

Governance Principles

lib-device governance is scoped to reusable device contracts shared by dependent repositories.

The scoped governance rules are:

  • It must expose narrow, documented APIs rather than component-specific policy.
  • It keeps wire formats, constants, parsers, and validation helpers deterministic and testable.
  • It preserves clean-room implementation boundaries and does not introduce external crate dependencies.
  • Breaking API or format changes require coordinated updates in every dependent repository.

Library Boundaries

  • lib-device carries no runtime authority by itself; authority is held by callers that use the library.
  • The crate must not hide ambient I/O, allocation policy, or service discovery behind helper APIs.

Contact

Development occurs in EriX organization and discussions happen in issues and design documents.

No decisions are considered valid without documented rationale.

Maintainers can be reached via email: admin@erikinkinen.fi.