Expand description
Proc-macros for soothfast.
#[measured], #[bench], #[fixture], and #[mock_seam] register the
annotated function into the soothfast registry (see soothfast-registry)
without altering the function itself. #[measured]/#[bench] also
accept checked performance claims: alloc = N, p99 = "1ms", and
(bench only) complexity = "n log n" with setup_sized/sizes(...).
Attribute Macros§
- bench
- Register a bench harness function, optionally fed by a setup fn.
- fixture
- Mark a deterministic input-builder. Registers metadata only; the function
is referenced by name from
#[bench(setup = ...)]/setup_sized. - measured
- Register a zero-argument function as a directly measured item.
- mock_
seam - Mark a mock-backend setup fn, resolved at runtime by name via
soothfast::mock::activate— referenced from a markdownmock=NAME/mock=NAME(ARG)tag, which is plain text rather than asyn::Path, so (unlike#[fixture], wired at compile time through a macro attribute argument) this can’t be called from a literal call site the macro controls; the registry stores a name-keyed fn pointer instead. - route
- Declare the spec operation a handler implements — the code-side half of
cargo soothfast spec check. Stackable for handlers serving several surfaces (REST + GraphQL + MCP).