Available on crate feature
code only.Expand description
Code execution substrate (experimental — labs preset).
First-class code execution for agents, Studio, and generated projects:
CodeExecutor- Backend trait for executionExecutionRequest- Typed execution requestExecutionResult- Structured execution resultSandboxPolicy- Sandbox capability modelWorkspace- Collaborative project context
Available with feature: code
Modules§
- a2a_
compat - A2A-compatible event mapping boundary for collaboration transport.
- compat
- Migration compatibility guide.
- diagnostics
- Rust compiler diagnostic parsing.
- harness
- Harness template and source validation for Rust code execution.
Structs§
- Artifact
Ref - Reference to an externally stored artifact.
- Backend
Capabilities - Capabilities that a backend can actually enforce.
- Code
Result - Result of a successful
RustExecutor::executecall. - Code
Tool - A tool that executes code through language-specific pipelines.
- Collaboration
Event - A typed collaboration event for cross-agent coordination in a shared workspace.
- Container
Command Executor - CLI-based container executor that shells out to
docker runper execution. - Container
Config - Configuration for the CLI-based container command executor.
- Docker
Config - Configuration for the Docker executor.
- Execution
Metadata - Execution metadata for telemetry, audit, and artifact correlation.
- Execution
Request - A full execution request.
- Execution
Result - Structured result of a code execution.
- Rust
Diagnostic - A parsed Rust compiler diagnostic.
- Rust
Executor - Rust-specific executor that compiles code through a check → build → execute pipeline
and delegates execution to a
SandboxBackend. - Rust
Executor Config - Configuration for the
RustExecutorpipeline. - Rust
Sandbox Config - Configuration for the Rust sandbox executor.
- Rust
Sandbox Executor - The flagship Rust-authored code execution backend.
- Sandbox
Policy - Sandbox policy describing the requested execution constraints.
- Wasm
Guest Config - Configuration for the WASM guest executor.
- Wasm
Guest Executor - Guest-module backend for precompiled
.wasmmodules. - Workspace
- A shared project context for collaborative code generation and execution.
- Workspace
Builder - Builder for constructing a
Workspacewith fluent configuration. - Workspace
Metadata - Metadata about a workspace project and execution session.
Enums§
- Code
Error - Errors from the language-aware code pipeline (
RustExecutor). - Collaboration
Event Kind - The kind of a collaboration event in a shared workspace.
- Environment
Policy - Environment variable access policy for sandboxed execution.
- Execution
Error - Errors that can occur during code execution.
- Execution
Isolation - Backend isolation class.
- Execution
Language - Supported execution languages.
- Execution
Payload - The code or module to execute.
- Execution
Status - Terminal status of an execution.
- Filesystem
Policy - Filesystem access policy for sandboxed execution.
- Guest
Module Format - Format of a precompiled guest module.
- Network
Policy - Network access policy for sandboxed execution.
Constants§
- HARNESS_
TEMPLATE - The harness template that wraps user code.
Traits§
- Code
Executor - Async trait for code execution backends.
Functions§
- parse_
diagnostics - Parse rustc JSON diagnostics from
--error-format=jsonoutput. - validate_
policy - Validates that the backend can enforce the requested sandbox policy.
- validate_
request - Validates a full execution request against a backend’s capabilities.
- validate_
rust_ source - Validate that user source code fits the phase 1 bounded source model.
- validate_
wasm_ bytes - Validate that the bytes represent a valid WASM binary module.