camel-function
Out-of-process function runtime for rust-camel.
Provides the function: DSL step — executes user-supplied TypeScript/JavaScript functions inside Deno containers with automatic lifecycle management, hot-reload, and structured error mapping.
See docs/function-step.md for the full DSL reference.
Quick Start
use ;
use CamelContext;
async
Runner
Endpoints on port 8080: GET /health, POST /register, POST /invoke, POST /shutdown.
Security: --allow-net=0.0.0.0 --allow-env=PORT only.
Container Lifecycle
- Containers are spawned on first function registration per runtime.
ContainerProvider::Dropattempts graceful shutdown when the provider is dropped (best-effort, no panic outside tokio runtime).ctx.stop()triggers service shutdown which stops all runners.- After stop, no containers with label
camel.function.runner=trueshould remain. - If a container leaks (e.g. process killed without graceful shutdown), re-running will create new containers; orphaned ones must be cleaned manually with
docker rm $(docker ps -q --filter label=camel.function.runner=true).
Testing
License
Same as rust-camel.