mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-30 07:33:59 +08:00
refactor(windows): exclude unsupported crates at workspace boundary
Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com>
This commit is contained in:
@@ -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 _};
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user