kcode-rust-bins 2.0.0

Author, locally publish, and run small Rust binaries
Documentation
# kcode-rust-bins 2.0.0 Specification

## Boundary

The crate owns immutable managed-source generations, optimistic complete
replacement, strict migration from the earlier flat layout, disposable Podman
validation, immutable local executable publication, Cargo-compatible
publication selection, one framed guest protocol, and disposable execution.
The integrating server owns authorization, configured roots, payload-object
policy, blocking supervision, deployment, concurrency policy, and model-facing
schemas.

The source API deliberately follows `kcode-rust-libs-v2`: free `create`,
`open`, and `docs`; one `Lib` with public complete `files`; and
`Lib::{write, check, publish}`. There is no manager, public snapshot or
check-stage model, persistent-open lock, patch, delete, rename, list, reload,
or close.

## Source

Names and paths use the same canonical rules as `kcode-rust-libs-v2`. Root
`Cargo.toml` and `Documentation.md` are mandatory. `Cargo.lock` is omitted on
read and rejected on write. Persistent source is stored as immutable
generations behind atomic `HEAD`. A `Lib` privately retains its expected
generation; write rejects stale snapshots and atomically installs the complete
proposed source. Valid legacy flat repositories migrate on first open or docs.

## Build and publication

Check and publish materialize exactly the current in-memory source. A fixed Rust
1.97 Bookworm image performs networked dependency fetch, then network-disabled
locked/offline formatting, all-target build, Clippy with warnings denied,
tests, doc tests, a size-optimized `x86_64-unknown-linux-musl` release build,
and static-link inspection with `readelf`. Check discards the executable.

Publish atomically installs the exact validated executable under the separately
configured publication root at `<name>/v<major>.<minor>.<patch>/<name>`.
Publication versions are canonical stable SemVer taken from `Cargo.toml`.
Publishing a name/version that already exists fails without replacing it.
There are no checksums, mutable aliases, quotas, or automatic retention.

## Protocol and execution

Both frame directions use the fixed 8-byte `KRBIN` revision-2 magic,
little-endian lengths, one exact UTF-8 text value, and ordered byte objects.
Frames reject bad magic or UTF-8, overflow, truncation, trailing bytes, text
over 16 MiB, more than 1,024 objects, an object over 512 MiB, or aggregate
payload over 1 GiB.

`run` resolves a locally published executable by name and version selector.
`v1.2.3` is exact; other selectors, including abbreviated `v` selectors, use
Cargo-compatible SemVer requirements and select the highest matching stable
publication. Calls default to a two-minute timeout and may supply any nonzero
alternative timeout.

The executable runs in an open-networked rootless disposable Podman container.
The host concurrently writes stdin and drains stdout/stderr, requires zero exit
plus one complete output frame, and retains at most 1 MiB of diagnostics.
`ObjectStore` is used only to load ordered payload inputs and save ordered
payload outputs; published executables never enter it. The crate imposes no
concurrency limit. It grants no authorization, confidentiality, exactly-once
effects, or safety claim. No host secrets, Podman socket, or ambient host data
are injected.