Expand description
§wabot-core
Core foundations of the Wabot framework — the Rust port of
@wabot-dev/framework’s src/core/* layer.
What lives here:
injection— DI container (tsyringeanalogue).storable— generic, serde-enforced data container.entity— Storable + identity, timestamps, soft-delete.description— human-readable metadata for AI tool schemas.validation— declarative, introspectable validators.
Higher layers (feature/*, addon/*) build on this crate and on the
wabot-macros proc-macro crate which provides #[singleton],
#[injectable], #[derive(Validate)], #[description("…")], etc.
Modules§
- audit
- Who caused a change. Port of
wabot-ts/src/core/audit. - auth
- Per-request authentication state. Port of
wabot-ts/src/core/auth. - config
- Declarative configuration read from the environment. Port of
wabot-ts/src/core/config. - description
- Description metadata — human-readable text attached to fields and methods, used by the mindset layer to build LLM tool schemas.
- entity
- Entity — Storable + identity, timestamps, and protected-field-aware update.
- env
- Typed environment-variable reading. Port of
wabot-ts/src/core/env. - idempotency
- Handle a repeated delivery once. Port of
wabot-ts/src/core/idempotency. - injection
- Dependency injection — the foundation everything else in the framework
sits on. See
container::Container. - lifecycle
- Who caused a change. Rides the
log_context, so it needs the sameasync-contextfeature. Graceful shutdown and crash handling. Port ofwabot-ts/src/core/lifecycle. - lock
- Per-key locking primitive. Port of
wabot-ts/src/core/lock(ILocker/ILockKey/Locker). - log_
context - Correlation fields that follow a unit of work across
.awaitpoints. Behind theasync-contextfeature (on by default) because it is the one part of core that needs a task-local, and so an async runtime — see the note in CLAUDE.md about keeping core runtime-free. Correlation fields that follow a unit of work. Port ofwabot-ts/src/core/logger/logContext.ts. - mapper
- Convert one shape into another, validating on the way. Port of
wabot-ts/src/core/mapper. - password
- Password hashing. Port of
wabot-ts/src/core/password, with the algorithm upgraded. - prelude
- One-stop import for the foundation types most consumers need.
- random
- Cryptographically-secure random values. Port of
wabot-ts/src/core/random. - rate_
limit - Fixed-window rate limiting. Port of
wabot-ts/src/core/rate-limit. - repository
- Storage-agnostic repository traits. Port of
wabot-ts/src/core/repository. - storable
- Storable — generic, serialization-safe data container.
- validation
- Validation system — declarative field validators with introspectable metadata.
Macros§
- register_
singletons - Register every
#[singleton]-annotated type in one call. - register_
transients - Register
#[injectable]types as transients — rebuilt for every resolve, with the resolving container.