Skip to main content

Crate kcode_k1_daemon_code_services

Crate kcode_k1_daemon_code_services 

Source
Expand description

§K1 daemon code services

CodeServices::open constructs the daemon’s one process-owned RustCode service and one process-owned WebCode service. It opens the public Rust projection beneath <state_root>/rust, registers the KTO-backed versionless Web workspace subsystem from genesis, uses disposable per-user caches beneath <state_root>/rust/code-cache and <state_root>/web/code-cache, and gives WebCode the same public projection retained by the daemon’s Web HTTP composition.

Startup requires no configuration environment variables. The package finds podman on PATH and reuses one content-versioned local tool image containing Rust 1.97, Clippy, rustfmt, Chromium, and kcode-k1-web-checker. If that image is absent, startup builds it from the embedded Containerfile. The checker executable is copied from the image into disposable K1 state, and Chromium’s path and version are read from the image. The Rust target is derived from the supported Linux host architecture.

Package-owned revision constants identify disposable cache and check policy. Web checks use one 225-second deadline and no explicit CPU, memory, PID, tmpfs-size, or shared-memory-size limits. Public source and durable unpublished Web work remain KTO-backed; all code-service caches and tool material are disposable.

The caller supplies the existing process Ordering, Peering, Groups, Objects, and shared Web projection. into_parts returns the RustCode service followed by the WebCode service for the full Chat Service constructor. The package performs no check, publication, provider call, listener work, migration, or deployment. Startup failures preserve complete command diagnostics.

Structs§

CodeServices