clusterflux-public/crates/clusterflux-node/src/windows_dev.rs
Clusterflux release dry run e4e73e245a Public dry run release-5ee549dd5fdd
Source commit: 5ee549dd5fddc98e4ee5054679bb0ac405c82529

Public tree identity: sha256:61b170dbdd26d350b8aff072e1792d38afd76bac7881bd42f271864d9662a6d4
2026-07-16 02:13:48 +02:00

39 lines
1.2 KiB
Rust

use clusterflux_core::{
Capability, CommandBackendKind, CommandInvocation, CommandPlan, GuestRuntimeKind,
};
use crate::{BackendError, CommandBackend};
#[derive(Clone, Debug, Default)]
pub struct WindowsCommandDevBackend;
impl CommandBackend for WindowsCommandDevBackend {
fn kind(&self) -> CommandBackendKind {
CommandBackendKind::WindowsCommandDev
}
fn plan(&self, _invocation: &CommandInvocation) -> Result<CommandPlan, BackendError> {
Ok(CommandPlan {
guest_runtime: GuestRuntimeKind::Wasmtime,
backend: CommandBackendKind::WindowsCommandDev,
required_capability: Capability::WindowsCommandDev,
user_attached_development_execution: true,
})
}
}
#[derive(Clone, Debug, Default)]
pub struct WindowsSandboxStubBackend;
impl CommandBackend for WindowsSandboxStubBackend {
fn kind(&self) -> CommandBackendKind {
CommandBackendKind::StubbedWindowsSandbox
}
fn plan(&self, _invocation: &CommandInvocation) -> Result<CommandPlan, BackendError> {
Err(BackendError::Denied(
"Windows sandbox backend is an explicit stub for MVP; use windows-command-dev only for user-attached development execution"
.to_owned(),
))
}
}