pub struct SandboxConfig {
pub kind: Backend,
pub network: bool,
pub writable: Vec<PathBuf>,
pub readable: Vec<PathBuf>,
pub env: Vec<String>,
pub image: String,
pub memory_mb: Option<u64>,
pub cpus: Option<f64>,
}Fields§
§kind: Backend§network: boolLet confined commands reach the network.
Off by default, and this is the single most valuable line in the file:
with it off, shell stops being an exfiltration route, which is what
lets the trifecta interlock relax rather than tighten.
writable: Vec<PathBuf>Extra paths mounted writable, on top of the workspace.
readable: Vec<PathBuf>Extra paths mounted read-only. Use for a toolchain or a cache that lives outside the workspace.
env: Vec<String>Environment variables passed through by name. Nothing else survives — an allowlist, because the interesting variables are the secret ones.
image: StringContainer image for the docker backend.
memory_mb: Option<u64>Memory ceiling in megabytes (docker only).
cpus: Option<f64>CPU ceiling (docker only), e.g. 2.0.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SandboxConfig
impl Debug for SandboxConfig
Source§impl Default for SandboxConfig
impl Default for SandboxConfig
Source§impl<'de> Deserialize<'de> for SandboxConfigwhere
SandboxConfig: Default,
impl<'de> Deserialize<'de> for SandboxConfigwhere
SandboxConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnsafeUnpin for SandboxConfig
impl UnwindSafe for SandboxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more