Skip to main content

Module compat

Module compat 

Source
Expand description

Migration compatibility guide.

This module documents the migration path from the legacy adk-code types to the new adk-sandbox + redesigned adk-code types.

§Migration Guide

Old Type (deprecated)New TypeCrate
CodeExecutorSandboxBackendadk-sandbox
ExecutionRequestExecRequestadk-sandbox
ExecutionResultExecResultadk-sandbox
RustSandboxExecutorRustExecutoradk-code
RustSandboxConfigRustExecutorConfigadk-code
RustCodeTool (adk-tool)CodeTooladk-code

§Key API Differences

§CodeExecutorSandboxBackend

The old CodeExecutor trait had lifecycle methods (start, stop, restart, is_running) and a complex ExecutionRequest with SandboxPolicy. The new SandboxBackend trait is minimal: execute(ExecRequest) -> Result<ExecResult, SandboxError>.

§ExecutionRequestExecRequest

The old ExecutionRequest had payload (enum with Source and GuestModule), sandbox (policy struct), identity, and argv. The new ExecRequest is flat: language, code, stdin, timeout, memory_limit_mb, env.

§RustSandboxExecutorRustExecutor

The old executor embedded isolation logic. The new RustExecutor delegates execution to a SandboxBackend, separating compilation from isolation. Constructor changes from RustSandboxExecutor::default() to RustExecutor::new(backend, config).

§Timeline

  • v0.5.0: Old types deprecated with #[deprecated] attributes
  • v0.6.0: Old types removed