pub struct WorkspaceProcessRunner { /* private fields */ }Expand description
Host-process runner that confines each process action.
Linux applies Landlock and, unless the action was granted network, a seccomp filter. macOS applies a Seatbelt profile. The Merry process itself stays unrestricted.
Implementations§
Source§impl WorkspaceProcessRunner
impl WorkspaceProcessRunner
Sourcepub fn new_at_workspace_root(root: impl Into<PathBuf>) -> Self
pub fn new_at_workspace_root(root: impl Into<PathBuf>) -> Self
Creates a per-action workspace runner rooted at a workspace path.
Sourcepub fn read_only_workspace(self) -> Self
pub fn read_only_workspace(self) -> Self
Keeps the workspace readable and not writable.
Baseline paths such as /tmp stay writable. This does not turn the
sandbox off.
Sourcepub fn with_environment(self, environment: WorkspaceProcessEnvironment) -> Self
pub fn with_environment(self, environment: WorkspaceProcessEnvironment) -> Self
Sets the environment layout visible to child processes.
Sourcepub fn allow_network(self) -> Self
pub fn allow_network(self) -> Self
Allows network access for child process actions.
Sourcepub fn with_path_rules(
self,
rules: impl IntoIterator<Item = PathAccessRule>,
) -> Self
pub fn with_path_rules( self, rules: impl IntoIterator<Item = PathAccessRule>, ) -> Self
Installs trusted path rules for child process actions.
Sourcepub fn with_session_permissions(
self,
permissions: ProcessSessionPermissions,
) -> Self
pub fn with_session_permissions( self, permissions: ProcessSessionPermissions, ) -> Self
Shares session-scoped approved capabilities with the permissioned runner factory.
Trait Implementations§
Source§impl Clone for WorkspaceProcessRunner
impl Clone for WorkspaceProcessRunner
Source§impl Debug for WorkspaceProcessRunner
impl Debug for WorkspaceProcessRunner
Source§impl ProcessRunner for WorkspaceProcessRunner
impl ProcessRunner for WorkspaceProcessRunner
Source§fn run<'a>(
&'a self,
intent: ProcessActionIntent,
context: ProcessRunnerContext,
) -> ProcessRunnerFuture<'a>
fn run<'a>( &'a self, intent: ProcessActionIntent, context: ProcessRunnerContext, ) -> ProcessRunnerFuture<'a>
Runs a validated process intent and returns provider-neutral output.
Source§fn background_control(&self) -> Option<Arc<dyn BackgroundProcessControl>>
fn background_control(&self) -> Option<Arc<dyn BackgroundProcessControl>>
Returns the session board that retains this runner’s background processes. Read more
Auto Trait Implementations§
impl Forget for WorkspaceProcessRunner
impl Freeze for WorkspaceProcessRunnerwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(OsString, OsString)>: Freeze,
PhantomData<OsString>: Freeze,
PhantomData<HostIntegration>: Freeze,
PhantomData<PathBuf>: Freeze,
PhantomData<PathAccessRule>: Freeze,
*const ArcInner<RwLock<ProcessSessionPermissionSnapshot>> is !null: Freeze,
PhantomData<ArcInner<RwLock<ProcessSessionPermissionSnapshot>>>: Freeze,
*const ArcInner<SupervisorInner> is !null: Freeze,
PhantomData<ArcInner<SupervisorInner>>: Freeze,
impl Move for WorkspaceProcessRunner
impl RefUnwindSafe for WorkspaceProcessRunnerwhere
Atomic<usize>: RefUnwindSafe,
RwLock<ProcessSessionPermissionSnapshot>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
Mutex<Vec<RetainedProcess>>: RefUnwindSafe,
impl Send for WorkspaceProcessRunner
impl Sync for WorkspaceProcessRunner
impl Unpin for WorkspaceProcessRunner
impl UnsafeUnpin for WorkspaceProcessRunnerwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(OsString, OsString)>: UnsafeUnpin,
PhantomData<OsString>: UnsafeUnpin,
PhantomData<HostIntegration>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
PhantomData<PathAccessRule>: UnsafeUnpin,
*const ArcInner<RwLock<ProcessSessionPermissionSnapshot>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<ProcessSessionPermissionSnapshot>>>: UnsafeUnpin,
*const ArcInner<SupervisorInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<SupervisorInner>>: UnsafeUnpin,
impl UnwindSafe for WorkspaceProcessRunnerwhere
RawVecInner: UnwindSafe,
Arc<RwLock<ProcessSessionPermissionSnapshot>>: UnwindSafe,
Arc<SupervisorInner>: UnwindSafe,
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