Skip to content

Rust library support for humility - starting with humility tasks #586

@adamlouis

Description

@adamlouis

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:

Humility usage in facade:

Example "humility application library" in DMAR Python:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions