boson-runtime
Worker runtime, builder, and enqueue orchestration.
Wire the worker (or enqueue-only host) process here once; task authors add handlers via
boson-macros without repeating boot steps.
Topology (embedded vs remote): see boson
Getting started.
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] (Mode 1 — once per process)
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 Mode 1 /
Mode 2 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 guided get-startedboson-macros— task attribute macroboson-core—QueueBackendtrait, identity traitsboson-telemetry—OpsLogadapters