boson-runtime
Worker runtime, builder, and enqueue orchestration — Integrating the server.
Wire the worker process here once; task authors add handlers via boson-macros
without repeating boot steps.
Role
Boson/BosonBuilder— injectQueueBackend, identity factory, andOpsLog- Background worker loop with lease-based claim and dispatch
configure/default— process-wide default required for macrosend_with(once at boot)TaskRegistry— auto-discovery viaauto_registryor manual registration in tests
Boot with #[task] (once per worker)
use Arc;
use JsonExecutionContextFactory;
use MemQueueBackend;
use ;
let boson = builder
.queue_backend
.execution_context_factory
.auto_registry
.build?;
configure;
Link every crate that defines #[boson::task] handlers into the worker binary. See
boson Integrating the server and task_macro.
Manual task registration (tests)
use ;
let mut registry = new;
let desc: &'static TaskDescriptor = Boxleak;
registry.register;
Related crates
boson— main crate and documentation mapboson-macros— task attribute macroboson-core—QueueBackendtrait, identity traitsboson-telemetry—OpsLogadapters