mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-11-01 07:53:42 +08:00
Introduce driver-kubernetes, driver-docker, driver-podman, and driver-vm cargo features on openshell-server, all enabled by default. Building with --no-default-features and selecting a subset produces a gateway that only carries the requested drivers. The three container-driver crates flip to optional dependencies. The VM driver runs out-of-process already, so driver-vm gates the in-server launcher and match arm rather than a Cargo dep. Feature gates cover: - driver crate imports and re-exports in compute/mod.rs - ComputeRuntime::new_docker / new_kubernetes / new_podman - Docker's ShutdownCleanup / StartupResume trait impls - the compute::vm module and VmComputeConfig re-export - driver-specific *_config_from_context and apply_*_runtime_defaults - the K8s ServiceAccount authenticator bootstrap in ServerState - the auth::k8s_sa module and state field - authenticator-chain construction in multiplex.rs - SupervisorReadiness impl for SupervisorSessionRegistry - driver-specific unit tests in cli.rs, lib.rs, driver_config.rs A zero-driver build is a supported extension-only gateway shape: it carries no in-tree driver code and speaks compute_driver.proto over a Unix socket to an out-of-tree driver named in compute_drivers with a matching [openshell.drivers.<name>].socket_path. The runtime gate in resolve_configured_compute_driver (see the follow-up commit) still rejects a built-in that was compiled out with the "rebuild with --features driver-X" message, so silent misconfiguration is impossible. Default builds are byte-equivalent to before. Each of the four single-driver builds compiles cleanly under -D warnings, as does the docker + podman combo and the zero-driver extension-only build. Signed-off-by: Dimitar Mirchev <28221091+dimityrmirchev@users.noreply.github.com>