kcode-k1-rust-coding 0.2.2

Orchestrate per-user public K1 Rust coding operations
Documentation
1
2
3
4
5
6
7
8
9
# Consumer contract

`K1RustCoding` is the synchronous, caller-owned coding service for one user. `open` reuses that user’s disposable Cargo downloads, compiled output, workspaces, internal K1 registry, and successful-check receipts across ordinary service restarts when the schema and toolchain policy still match. `reset` explicitly replaces that cache. Operations are serialized through `&mut self`; the package owns no retries, background work, deployment, or cross-user state.

`check(package)` treats every published K1 library as public. It recursively resolves each K1 dependency to the newest compatible published version, installs the exact resolved closure into the local Cargo registry, materializes the candidate, and runs one network-enabled Podman check when no matching receipt exists. `check_fresh(package)` always performs that check and returns an opaque `VerifiedCheck`. `current_check(package)` performs no Podman work and returns a `VerifiedCheck` only when the current complete check identity still has a successful receipt.

`publish(package, gate)` preserves the existing check-then-publish flow. `publish_checked(package, verified, gate)` performs no check; it rejects a stale `VerifiedCheck`, asks `RustPublishAuthorization` whether this user may publish under the package’s authority immediately before writing the immutable source through the K1 Rust projection, and installs published or idempotent source into the user’s local registry without contacting crates.io. Public reading and dependency use require no authorization. A completed publication followed by local-cache failure is returned as `AfterPublish`.

`build_binary(package, binary)` checks the package and performs the separate requested release build, returning the exact executable path and complete diagnostics. `CheckOutcome` distinguishes exact receipt reuse from a performed check. `RustCodingError` distinguishes local state, publish-authorization infrastructure, unavailable compatible public dependencies, denied publication, stale checks, Podman failures, and post-publication local failures.