@@ -17,45 +17,83 @@ path = "src/lib.rs"
1717[[bin ]]
1818name = " openshell-driver-vm"
1919path = " src/main.rs"
20+ required-features = [" compute-driver" ]
2021
2122[dependencies ]
2223openshell-core = { path = " ../openshell-core" , default-features = false }
23- openshell-otel = { path = " ../openshell-otel" }
24- openshell-policy = { path = " ../openshell-policy" }
25- openshell-driver-podman = { path = " ../openshell-driver-podman" }
26- openshell-vfio = { path = " ../openshell-vfio" }
24+ openshell-isolation-interface = { path = " ../openshell-isolation-interface" }
25+ openshell-otel = { path = " ../openshell-otel" , optional = true }
26+ openshell-policy = { path = " ../openshell-policy" , optional = true }
27+ openshell-driver-podman = { path = " ../openshell-driver-podman" , optional = true }
28+ openshell-vfio = { path = " ../openshell-vfio" , optional = true }
2729
28- bollard = { version = " 0.20" , features = [" ssh" ] }
30+ base64 = { workspace = true , optional = true }
31+ bollard = { version = " 0.20" , features = [" ssh" ], optional = true }
2932tokio = { workspace = true }
30- tonic = { workspace = true , features = [" transport" ] }
31- tower-http = { workspace = true }
32- http = { workspace = true }
33- prost = { workspace = true }
34- prost-types = { workspace = true }
35- futures = { workspace = true }
36- tokio-stream = { workspace = true , features = [" net" ] }
37- nix = { workspace = true }
38- clap = { workspace = true }
39- tracing = { workspace = true }
40- tracing-subscriber = { workspace = true }
41- opentelemetry = { workspace = true }
42- opentelemetry_sdk = { workspace = true }
43- tracing-opentelemetry = { workspace = true }
44- miette = { workspace = true }
45- url = { workspace = true }
33+ tonic = { workspace = true , features = [" transport" ], optional = true }
34+ tower-http = { workspace = true , optional = true }
35+ http = { workspace = true , optional = true }
36+ prost = { workspace = true , optional = true }
37+ prost-types = { workspace = true , optional = true }
38+ futures = { workspace = true , optional = true }
39+ tokio-stream = { workspace = true , features = [" net" ], optional = true }
40+ nix = { workspace = true , optional = true }
41+ clap = { workspace = true , optional = true }
42+ tracing = { workspace = true , optional = true }
43+ tracing-subscriber = { workspace = true , optional = true }
44+ opentelemetry = { workspace = true , optional = true }
45+ opentelemetry_sdk = { workspace = true , optional = true }
46+ tracing-opentelemetry = { workspace = true , optional = true }
47+ miette = { workspace = true , optional = true }
48+ rand = { workspace = true , optional = true }
49+ url = { workspace = true , optional = true }
4650serde = { workspace = true }
4751serde_json = { workspace = true }
48- oci-client = " 0.16"
52+ oci-client = { version = " 0.16" , optional = true }
4953libc = " 0.2"
50- rustix = { workspace = true }
51- libloading = " 0.8"
52- tar = " 0.4"
53- flate2 = " 1"
54- sha2 = " 0.10"
55- zstd = " 0.13"
54+ rustix = { workspace = true , optional = true }
55+ libloading = { version = " 0.8" , optional = true }
56+ tar = { version = " 0.4" , optional = true }
57+ flate2 = { version = " 1" , optional = true }
58+ sha2 = { version = " 0.10" , optional = true }
59+ zstd = { version = " 0.13" , optional = true }
5660
5761[features ]
58- default = [" telemetry" ]
62+ default = [" compute-driver" , " telemetry" ]
63+ # # Build the standalone compute driver and its host runtime implementation.
64+ compute-driver = [
65+ " dep:base64" ,
66+ " dep:bollard" ,
67+ " dep:clap" ,
68+ " dep:flate2" ,
69+ " dep:futures" ,
70+ " dep:http" ,
71+ " dep:libloading" ,
72+ " dep:miette" ,
73+ " dep:nix" ,
74+ " dep:oci-client" ,
75+ " dep:openshell-otel" ,
76+ " dep:openshell-policy" ,
77+ " dep:openshell-driver-podman" ,
78+ " dep:openshell-vfio" ,
79+ " dep:opentelemetry" ,
80+ " dep:opentelemetry_sdk" ,
81+ " dep:polling" ,
82+ " dep:prost" ,
83+ " dep:prost-types" ,
84+ " dep:rand" ,
85+ " dep:rustix" ,
86+ " dep:sha2" ,
87+ " dep:tar" ,
88+ " dep:tokio-stream" ,
89+ " dep:tonic" ,
90+ " dep:tower-http" ,
91+ " dep:tracing" ,
92+ " dep:tracing-opentelemetry" ,
93+ " dep:tracing-subscriber" ,
94+ " dep:url" ,
95+ " dep:zstd" ,
96+ ]
5997# # Compile in telemetry support (forwards to openshell-core/telemetry). On by
6098# # default; build with `--no-default-features` for a telemetry-free VM driver
6199# # that reports telemetry disabled to the sandboxes it launches.
@@ -68,7 +106,7 @@ telemetry = ["openshell-core/telemetry"]
68106# # enabling it alongside `telemetry` is a compile error rather than a silent
69107# # telemetry-on build. Kept in sync with `default` by
70108# # `rust:verify:defaults-without-telemetry`.
71- defaults-without-telemetry = []
109+ defaults-without-telemetry = [" compute-driver " ]
72110
73111[dev-dependencies ]
74112openshell-otel-test-support = { path = " ../openshell-otel-test-support" }
@@ -82,7 +120,7 @@ opentelemetry_sdk = { workspace = true, features = ["testing"] }
82120# nix::sys::prctl::set_pdeathsig there keeps the Linux path a single
83121# syscall with no helper thread.
84122[target .'cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "dragonfly"))' .dependencies ]
85- polling = " 3.11"
123+ polling = { version = " 3.11" , optional = true }
86124
87125[lints ]
88126workspace = true
0 commit comments