-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Currently, humility is accessible only as a CLI. For some usecases, it would be useful to interact with humility directly in Rust.
Our manufacturing systems currently shell out to the humility CLI wherever required, relying string parsing and manual error handling. A Rust library interface would provide: 1) structured error types, 2) typed return values eliminating parsing, and 3) compile-time interface guarantees. These mirror the general case for "why Rust?". Manufacturing systems need to handle errors properly and run reliably over long periods - Rust would help here & avoid risk of reliance on uncommitted string interfaces in shell. Some usage would remain in shell, some would move to Rust.
Manufacturing tooling would effectively build an application layer on top of humility. Initial implementation of a Humility library would expose humility tasks (effectively a ping check, also useful for https://github.com/oxidecomputer/facade/issues/297) along with necessary initialization support (archive, probe) and any scaffolding. Additional commands can be added as needed.
Example issues in facade that may benefit from humility Rust library:
- https://github.com/oxidecomputer/facade/issues/293
- https://github.com/oxidecomputer/facade/issues/295
- https://github.com/oxidecomputer/facade/issues/296
- https://github.com/oxidecomputer/facade/issues/297
- https://github.com/oxidecomputer/facade/issues/298
- https://github.com/oxidecomputer/facade/issues/299
- https://github.com/oxidecomputer/facade/issues/301
Humility usage in facade:
Example "humility application library" in DMAR Python: