mxc-sdk 1.2.0

Importable library for starting MXC sandboxes in-process, with streaming stdio.
Documentation
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! `bwrap_common` — shared library for the Bubblewrap sandbox backend.
//!
//! - [`bwrap_command`] builds the `bwrap` CLI argument vector from a
//!   [`ExecutionRequest`](crate::mxc_common::models::ExecutionRequest). It is
//!   platform-agnostic (pure argument generation) so it compiles and is
//!   fully unit-tested on every host.
//! - [`bwrap_version`] probes the host `bwrap` and checks it is new enough to
//!   understand every flag [`bwrap_command`] emits. Shared by the runner's
//!   `validate` and the engine's platform-support probe.
//! - `network_rules` validates rule addresses and builds the egress plan the
//!   sandbox's own network namespace is programmed with. Platform-agnostic for
//!   the same reason as [`bwrap_command`].
//! - `bwrap_runner` is gated to `target_os = "linux"` since it actually
//!   spawns the `bwrap` binary.

pub mod bwrap_command;
#[cfg(target_os = "linux")]
pub mod bwrap_runner;
pub mod bwrap_version;
#[cfg(target_os = "linux")]
pub(crate) mod capability_check;
pub(crate) mod host_tools;
#[cfg(target_os = "linux")]
pub(crate) mod identity;

/// Forks `bwrap` from a process-lifetime thread (see the module docs).
#[cfg(target_os = "linux")]
pub(crate) mod lifetime_spawner;
#[cfg(any(target_os = "linux", all(test, unix)))]
pub(crate) mod missing_denials;
/// Consumed only by the Linux-gated runner and proxy modules.
#[cfg(target_os = "linux")]
pub(crate) mod network_rules;
/// Shared by the `bwrap` version probe and the proxy dependency walk.
pub(crate) mod probe_exec;
/// Watches the private-namespace network provider for the run's lifetime.
#[cfg(target_os = "linux")]
pub(crate) mod provider_monitor;
/// Only [`proxy_network::probe_proxy_enforcement`] is reachable outside the
/// crate; every other item stays `pub(crate)`.
#[cfg(target_os = "linux")]
pub mod proxy_network;
#[cfg(target_os = "linux")]
pub(crate) mod resolver_file;
#[cfg(any(target_os = "linux", test))]
pub(crate) mod seccomp_filter;