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 from <state_root>/rust/projection and <state_root>/rust/control, uses disposable per-user caches beneath <state_root>/rust/code-cache and <state_root>/web/code-cache, and gives WebCode the same projection already retained by the daemon’s Web HTTP composition.

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.

Startup requires deployment-owned environment values: K1_PODMAN_EXECUTABLE, K1_RUST_CODE_SCHEMA_REVISION, K1_RUST_CODE_TOOLCHAIN_POLICY_REVISION, K1_RUST_CODE_IMAGE, K1_RUST_CODE_CHECK_POLICY_REVISION, K1_RUST_TARGET_TRIPLE, K1_RUST_CODE_COMMAND_POLICY_REVISION, K1_WEB_CODE_IMAGE, K1_WEB_CHECKER_EXECUTABLE, K1_WEB_CHROMIUM, K1_WEB_CHROMIUM_VERSION, K1_WEB_CPU_MILLIS, K1_WEB_MEMORY_BYTES, K1_WEB_PIDS_LIMIT, K1_WEB_TMPFS_BYTES, K1_WEB_SHM_BYTES, K1_WEB_CHECKER_TIMEOUT_MS, K1_WEB_WALL_TIMEOUT_MS, K1_WEB_CODE_BOOT_REVISION, K1_WEB_CODE_SCHEMA_REVISION, K1_WEB_CODE_ROUTE_REVISION, K1_WEB_CODE_HARNESS_REVISION, and K1_WEB_CODE_CHECK_POLICY_REVISION. Paths, image identities, and revisions retain their dependency contracts. Numeric values must be nonzero, and the Web wall timeout must exceed the checker timeout. Values are never defaulted or logged.

Rust uses toolchain 1.97; its image, target triple, and cache/check identities remain deployment inputs. Changing a revision intentionally invalidates only the corresponding disposable derived state or receipt identity.

The package performs no check, publication, provider call, listener work, deployment, retry, migration, or cleanup. Opening validates the Web Podman configuration and creates only its fixed state-root directories before constructing the services. Public source and durable publication remain KTO-backed; all code-service caches are disposable.

Structs§

CodeServices