diff --git a/crates/openshell-core/src/config.rs b/crates/openshell-core/src/config.rs index 2107f1136..e6d3cf429 100644 --- a/crates/openshell-core/src/config.rs +++ b/crates/openshell-core/src/config.rs @@ -390,12 +390,6 @@ fn current_uid() -> u32 { std::fs::metadata("/proc/self").map_or(0, |metadata| metadata.uid()) } -#[cfg(not(unix))] -fn is_unix_socket(path: &Path) -> bool { - let _ = path; - false -} - #[cfg(not(unix))] fn podman_socket_responds(path: &Path) -> bool { let _ = path; @@ -1045,14 +1039,14 @@ const fn default_ssh_session_ttl_secs() -> u64 { #[cfg(test)] mod tests { #[cfg(unix)] - use super::is_reachable_unix_socket; + use super::{is_reachable_unix_socket, is_unix_socket}; use super::{ ComputeDriverKind, Config, DEFAULT_SERVICE_ROUTING_DOMAIN, GatewayInterceptorBindingPolicy, GatewayInterceptorConfig, GatewayInterceptorFailurePolicy, GatewayJwtConfig, GatewayProviderProfileSourceConfig, PolicyValidationFailureMode, detect_docker_socket_from_candidates, detect_driver, detect_podman_socket_from_candidates, - docker_host_unix_socket_path, docker_socket_responds, is_unix_socket, - normalize_compute_driver_name, podman_socket_candidates_from_env, podman_socket_responds, + docker_host_unix_socket_path, docker_socket_responds, normalize_compute_driver_name, + podman_socket_candidates_from_env, podman_socket_responds, }; #[cfg(unix)] use std::io::{Read as _, Write as _}; diff --git a/crates/openshell-driver-docker/Cargo.toml b/crates/openshell-driver-docker/Cargo.toml index 90fb05aeb..7e1bc069c 100644 --- a/crates/openshell-driver-docker/Cargo.toml +++ b/crates/openshell-driver-docker/Cargo.toml @@ -10,15 +10,16 @@ rust-version.workspace = true license.workspace = true repository.workspace = true -[target.'cfg(not(target_os = "windows"))'.dependencies] +[dependencies] openshell-core = { path = "../openshell-core", default-features = false } -serde = { workspace = true } + tokio = { workspace = true } tonic = { workspace = true } futures = { workspace = true } tokio-stream = { workspace = true } tracing = { workspace = true } bytes = { workspace = true } +serde = { workspace = true } serde_json = { workspace = true } prost-types = { workspace = true } bollard = { version = "0.20" } diff --git a/crates/openshell-driver-kubernetes/Cargo.toml b/crates/openshell-driver-kubernetes/Cargo.toml index 2ff5a2519..2c02f864a 100644 --- a/crates/openshell-driver-kubernetes/Cargo.toml +++ b/crates/openshell-driver-kubernetes/Cargo.toml @@ -3,7 +3,6 @@ [package] name = "openshell-driver-kubernetes" -autobins = false description = "Kubernetes compute driver for OpenShell" version.workspace = true edition.workspace = true @@ -18,9 +17,7 @@ path = "src/main.rs" [dependencies] openshell-core = { path = "../openshell-core", default-features = false } openshell-policy = { path = "../openshell-policy" } -serde = { workspace = true } -[target.'cfg(not(target_os = "windows"))'.dependencies] tokio = { workspace = true } tonic = { workspace = true, features = ["transport"] } prost = { workspace = true } @@ -30,6 +27,7 @@ tokio-stream = { workspace = true } kube = { workspace = true } kube-runtime = { workspace = true } k8s-openapi = { workspace = true } +serde = { workspace = true } serde_json = { workspace = true } clap = { workspace = true } tracing = { workspace = true } @@ -39,7 +37,6 @@ miette = { workspace = true } [dev-dependencies] temp-env = "0.3" -serde_json = { workspace = true } [lints] workspace = true diff --git a/crates/openshell-driver-podman/Cargo.toml b/crates/openshell-driver-podman/Cargo.toml index 965e3684d..e46d2eed8 100644 --- a/crates/openshell-driver-podman/Cargo.toml +++ b/crates/openshell-driver-podman/Cargo.toml @@ -3,7 +3,6 @@ [package] name = "openshell-driver-podman" -autobins = false description = "Podman compute driver for OpenShell" version.workspace = true edition.workspace = true @@ -15,7 +14,7 @@ repository.workspace = true name = "openshell-driver-podman" path = "src/main.rs" -[target.'cfg(not(target_os = "windows"))'.dependencies] +[dependencies] openshell-core = { path = "../openshell-core", default-features = false } tokio = { workspace = true } diff --git a/crates/openshell-driver-vm/Cargo.toml b/crates/openshell-driver-vm/Cargo.toml index 0396a6324..0ee2740c7 100644 --- a/crates/openshell-driver-vm/Cargo.toml +++ b/crates/openshell-driver-vm/Cargo.toml @@ -3,7 +3,6 @@ [package] name = "openshell-driver-vm" -autobins = false description = "MicroVM compute driver for OpenShell" version.workspace = true edition.workspace = true @@ -11,11 +10,15 @@ rust-version.workspace = true license.workspace = true repository.workspace = true +[lib] +name = "openshell_driver_vm" +path = "src/lib.rs" + [[bin]] name = "openshell-driver-vm" path = "src/main.rs" -[target.'cfg(not(target_os = "windows"))'.dependencies] +[dependencies] openshell-core = { path = "../openshell-core", default-features = false } openshell-otel = { path = "../openshell-otel" } openshell-policy = { path = "../openshell-policy" } diff --git a/tasks/scripts/windows-msvc.ps1 b/tasks/scripts/windows-msvc.ps1 index def9cba81..4806116e1 100644 --- a/tasks/scripts/windows-msvc.ps1 +++ b/tasks/scripts/windows-msvc.ps1 @@ -63,7 +63,7 @@ if (-not [int]::TryParse($BuildJobsValue, [ref] $WindowsBuildJobs) -or $WindowsB } $WindowsCargoMutex = [System.Threading.Mutex]::new($false, "Local\OpenShellWindowsMsvcCargo") -$UnsupportedDriverPackageExcludes = "--exclude openshell-driver-docker --exclude openshell-driver-kubernetes --exclude openshell-driver-kubernetes-secrets --exclude openshell-driver-podman --exclude openshell-driver-vault --exclude openshell-driver-vm --exclude openshell-sandbox --exclude openshell-supervisor-process --exclude openshell-vfio" +$UnsupportedDriverPackageExcludes = "--exclude openshell-driver-docker --exclude openshell-driver-kubernetes --exclude openshell-driver-kubernetes-secrets --exclude openshell-driver-podman --exclude openshell-driver-vault --exclude openshell-driver-vm --exclude openshell-sandbox --exclude openshell-supervisor-network --exclude openshell-supervisor-process --exclude openshell-vfio" $WindowsClippyPackageExcludes = $UnsupportedDriverPackageExcludes $WindowsClippyLintArgs = "-D warnings -A dead-code -A unused-imports -A clippy::unused-async" $BundledZ3WorkspaceFeatures = "--features openshell-prover/bundled-z3"