- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Merge the selected feature/native-cli history with an explicit two-parent commit so main retains the development lineage and the validated source snapshot. The resulting tree is identical to the selected feature commit; no dependency pins or runtime behavior are changed by this merge. Previous main: |
||
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .markdownlint-cli2.yaml | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
lib-cli
lib-cli provides allocation-free command-line parsing, deterministic help
formatting, checked numeric conversion, and non-authoritative launch-intent
values for native EriX programs.
EriX is a clean-room, capability-based microkernel operating system written entirely in Rust.
See:
- docs for system architecture and the technical manual
- lib-ipc for wire representations
- launchd for authenticated launch mediation
Purpose of This Repository
This repository standardizes native CLI data handling without hiding authority, allocation, I/O, or process launch. Callers provide argument slices, duplicate tracking, output sinks, and every selector used in an invocation.
The maintained responsibilities are:
- parse long options, short options and clusters, values, operands, and
-- - reject unknown, duplicate, malformed, missing-value, NUL, and configured encoding errors deterministically
- preserve exact byte arguments while allowing callers to require UTF-8
- parse signed and unsigned decimal values with exact digit and overflow errors
- render normalized usage text through a caller-supplied fallible sink
- represent program/object selectors, environment data, standard stream roles, and narrow authority requests without treating them as capabilities
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
The crate is no_std, forbids unsafe code, denies missing public documentation,
and performs no allocation. ArgumentParser yields events directly from
caller-provided slices and uses one caller-provided Boolean per option for
duplicate tracking.
The public launch-intent types contain data only. A path, name, child slot, or
environment entry never proves access. launchd and powerboxd must resolve
selectors through explicitly delegated endpoints and install only authenticated,
attenuated capabilities.
Status
Implemented:
- allocation-free long/short option and operand parsing
- attached and following option values, short clusters, repeat policy, and
-- - byte-preserving and UTF-8 operand policies
- checked signed and unsigned decimal parsing
- normalized help output with visible sink exhaustion
- launch intent, environment, standard stream, and authority request values
- strict unit, Clippy, Rustdoc, source-size, dependency, and Markdown gates
Governance Principles
lib-cli governs deterministic data interpretation, not runtime authority.
- Caller-provided storage determines capacity.
- No parser or formatter uses global state or an arbitrary input ceiling.
- Selectors remain data until an authorized service binds them to object identity.
- Authority requests name one operation family and maximum lifetime.
- Git dependencies, when introduced, must use full 40-character commit
revpins. Integration source revisions and CI caches must preserve those identities without branch-head or synthetic-commit substitution.
Library Boundaries
- The crate holds no endpoint, filesystem, process, loader, service-discovery, clock, device, or logging authority.
- It performs no I/O and launches no process.
- POSIX shell grammar and evaluation belong to
exsh, not this generic library.
Contact
Development occurs in the EriX organization. Decisions and rationale are recorded in issues and design documents.
Maintainers can be reached at admin@erikinkinen.fi.