ZCONTAINER-CORE // EMBEDDABLE CONTAINER / KUBERNETES ENGINE

// pure Rust · bollard + kube-rs · rlib + staticlib + cdylib · no CLI subprocess

Engineering Report Source

zcontainer-core is the engine half of zcontainer, a Docker Desktop + Lens style desktop GUI. Pure Rust, no GUI dependencies in the core. It wraps the free Docker Engine HTTP API (Apache 2.0) via bollard and the kube-apiserver via kube-rs, and exposes both behind one synchronous command surface so every host — the standalone zcontainer Tauri app or a C/C++ host over the FFI — drives identical behaviour. It uses no docker, kubectl or helm CLI. This project is in active development.

One Command Surface

Every operation is Engine::invoke(cmd, args) taking a JSON argument object and returning a JSON result or a {error:{tag,message}} envelope. Streaming uses subscribe / unsubscribe / stream_send.

Three Surfaces

Rust (depend on the rlib), Tauri v2 (the tauri feature + plugin), and C ABI (link the staticlib / cdylib, see include/zcontainer_core.h).

Async Bridged to Sync

The Docker and Kubernetes clients are async; the engine owns a Tokio runtime and bridges each request to a synchronous result, while streaming commands run on background tasks and push frames to the host event sink.

No CLI

Docker via the Engine API through bollard; Kubernetes via the apiserver through kube-rs; Helm releases decoded directly from helm.sh/release.v1 secrets. No shelling out.

Command surface

Dockercapabilities, docker.ping, list of containers / images / volumes / networks, live docker.stats, container start / stop / restart / remove / inspect / logs, image remove / inspect, volume create / remove, network remove / inspect, docker.system.df + prune, and Compose list / start / stop / restart / down. Kubernetes — contexts (from kubeconfig), namespaces, pods / deployments / statefulsets / daemonsets / replicasets / jobs / cronjobs / services, nodes, CRDs, Helm releases, and a generic k8s.resource.get returning manifest YAML. Streaming commands cover log-follow, interactive exec, image-pull progress and TCP port-forwarding.

Where it embeds

The crate builds as rlib + staticlib + cdylib, so the same engine backs the zcontainer Tauri app natively and any C/C++ host over the FFI. See the engineering report for the full command tables and the surface matrix.