Skip to main content

Crate mimobox_sdk

Crate mimobox_sdk 

Source
Expand description

mimobox-sdk: Unified Agent Sandbox API

Smart routing by default, full control for advanced users.

Zero-config sandbox creation with automatic backend selection, plus complete configuration control via Config::builder().

§Quick Start

use mimobox_sdk::Sandbox;

let mut sandbox = Sandbox::new()?;
let result = sandbox.execute("/bin/echo hello")?;
println!("exit: {:?}", result.exit_code);
sandbox.destroy()?;

§Feature Gates

FeatureBackendDefault
osOS-level (Linux/macOS)Yes
vmmicroVM (Linux + KVM)No
wasmWasm (Wasmtime)No

§Key Types

Structs§

Config
SDK-level configuration for sandbox creation and behavior.
ConfigBuilder
Fluent builder for constructing Config instances.
DirEntry
目录条目,表示 list_dir 返回的单个条目。
ExecuteResult
Result of a sandbox command execution.
FileStat
文件元信息,stat 方法返回的类型。
HttpResponse
HTTP response from the controlled host-side proxy.
PtyConfig
PTY session configuration.
PtySession
Interactive PTY terminal session.
PtySize
PTY terminal dimensions.
RestorePoolvm and Linux
Snapshot-based restore pool for sub-millisecond VM restore-to-ready latency.
RestorePoolConfigvm and Linux
Configuration for creating a snapshot-based restore pool.
Sandbox
Primary entry point for all sandbox operations.
SandboxSnapshot
Opaque handle to a sandbox memory snapshot.

Enums§

ErrorCode
Structured error code for programmatic error matching.
FileType
文件类型枚举,用于目录条目的类型区分。
IsolationLevel
Isolation level selection strategy.
NetworkPolicy
Network access policy for the sandbox.
PtyEvent
PTY session event.
SdkError
SDK error type.
StreamEvent
Streaming output event from [Sandbox::stream_execute()].
TrustLevel
Trust level for code being executed.