clusterflux-public/crates/clusterflux-node/src/windows_dev.rs
Clusterflux release 3996d91ee0 Public release release-ffc6f14a3723
Source commit: ffc6f14a3723ea6aa513613a5406d737f21b201d

Public tree identity: sha256:a77575c31dda8de868bc8de91d94df55c46f0b028e755e56a8cce8e27f72a42b
2026-07-19 16:41:50 +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(),
))
}
}