Skip to main content

Module executor

Module executor 

Source
Expand description

Lambda function execution engine.

Converts the stubbed Invoke echo path into real execution by routing every request through an Executor trait. Backends include:

  • NoopExecutor — preserves the legacy “echo back the payload” behavior; used in unit tests and when LAMBDA_EXECUTOR=disabled.
  • AutoExecutor — defaults macOS Zip Lambdas to Squib and otherwise uses native execution.
  • NativeExecutor (Phase 3) — spawns provided.* bootstraps directly on the host.
  • DockerExecutor (Phase 4) — runs any supported runtime in an AWS Lambda base image.
  • SquibExecutor — runs arm64 Zip functions through a Squib microVM guest agent.

All backends share a single in-process Lambda Runtime API server (Phase 2) so the bootstrap-side protocol is identical to AWS.

async-trait is required because RustackLambda stores the executor as Arc<dyn Executor> for backend swapping at startup; the trait must be object-safe.

Modules§

runtime_api
In-process Lambda Runtime API server.

Structs§

AutoExecutor
Executor that chooses the concrete backend for each invocation.
InvokeRequest
Everything an executor needs to run one invocation.
InvokeResponse
Outcome of a successful round-trip with the user code (which may itself have reported a function error).
NativeExecutor
Native process executor.
NoopExecutor
Echoes the request payload back wrapped in a fake API Gateway response shape — identical to the old hard-coded stub.
SquibExecutor
Lambda executor that delegates invocation to a Squib microVM guest agent.
SquibExecutorConfig
Configuration for SquibExecutor.

Enums§

ExecutorBackend
Selects which execution backend the provider should construct at startup.
ExecutorError
Failure modes for an execution backend.
PackageType
Deployment package kind, mirroring the Lambda API.

Traits§

Executor
Backend that turns an InvokeRequest into an InvokeResponse.