Allocation-free command-line parsing, help formatting and non-authoritative launch-intent types for EriX.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen 7a7327da50
All checks were successful
CI / markdown (push) Successful in 8s
CI / rust (push) Successful in 27s
chore: Merge native CLI development into main
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: 0b13cce781
Selected feature: bc1701df15

Publish this integration point following the requested cross-repository merge. Preserve the feature branch and immutable dependency objects for reproducibility; do not squash, rebase or rewrite existing commits.
2026-09-12 08:28:45 +03:00
.github build: Pin dependency and CI helper source commits 2026-09-12 07:31:11 +03:00
src Cover caller-sized CLI parser inputs 2026-08-05 21:28:54 +03:00
.editorconfig Initial commit 2026-08-05 19:46:10 +02:00
.gitignore Initial commit 2026-08-05 19:46:10 +02:00
.markdownlint-cli2.yaml Initial commit 2026-08-05 19:46:10 +02:00
ARCHITECTURE.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:11 +03:00
Cargo.toml Implement allocation-free native CLI contracts 2026-08-05 21:15:54 +03:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:14 +03:00
CONTRIBUTING.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:11 +03:00
LICENSE Initial commit 2026-08-05 19:46:10 +02:00
README.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:11 +03:00
ROADMAP.md build: Pin dependency and CI helper source commits 2026-09-12 07:31:11 +03:00
rustfmt.toml Initial commit 2026-08-05 19:46:10 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:14 +03:00

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 rev pins. 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.