Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Documentation: https://rustvello.readthedocs.io
Source Code: https://github.com/pynenc/rustvello
Rustvello is a distributed task orchestration engine — broker, orchestrator, state backend, trigger system, client data store, and runner — implemented in Rust for performance and safety. It works standalone from both Rust and Python (via PyO3 bindings), and also integrates with pynenc as an optional high-performance backend plugin.
Deciding whether it fits? Read When to use Rustvello, Idempotency and the at-least-once contract, Migrating from Celery and the benchmark against Celery (reproducible, with its limits).
Repository Structure
This is a multi-crate Rust workspace with Python bindings:
| Crate | Description |
|---|---|
rustvello-proto |
Data transfer objects and wire types (identifiers, status FSM, config, trigger types) |
rustvello-core |
Core ports (Broker, InvocationControlBackend, StateBackend, TriggerStore, ClientDataStore) + business logic managers |
rustvello-mem |
In-memory backend implementations (development and testing) |
rustvello-sqlite |
SQLite-backed backend implementations (single-node production) |
rustvello-redis |
Redis backend implementations |
rustvello-postgres |
PostgreSQL backend implementations |
rustvello-mongo |
MongoDB backend implementations (driver v3) |
rustvello-mongo3 |
MongoDB backend implementations (driver v2 — legacy) |
rustvello-rabbitmq |
RabbitMQ broker implementation |
rustvello-otel |
Bounded OTLP lifecycle exporter |
rustvello-macros |
#[rustvello::task] proc-macro with 8 configuration attributes |
rustvello |
Main library — app builder, task runner, trigger builder, auto-discovery |
rustvello-cli |
CLI tool for running workers, inspecting status, and purging data |
rustvello-monitoring |
Web-based monitoring dashboard (Axum + Askama + HTMX) |
rustvello-test-suite |
Shared backend compliance tests via macro-generated test suites |
rustvello-python |
PyO3 bindings exposing Rust types to Python |
py-rustvello |
Python package (cdylib + PyO3 bindings) providing the rustvello module |
For the full architecture, see ARCHITECTURE.md.
Key Features
- Typed Task System: proc-macro
#[rustvello::task]generates serializable params, deterministic call IDs, and compile-time auto-discovery viainventory - Async Tasks:
async fn(Rust) andasync def(Python) task bodies awaited natively on the worker's runtime or event loop, with the same retries, results and context propagation as synchronous tasks - Idempotency Keys: at-least-once execution with a stable invocation id per retry and recovery;
submit_with_key/submit_call_with_keyturn repeated submissions of one key into one invocation on SQLite and PostgreSQL - Retries, Timeouts and Cancellation: exponential backoff with jitter stored as durable delayed retries, per-attempt execution deadlines, and cooperative cancellation of queued or running invocations
- Invocation State Machine: 14-state FSM with guarded transitions, ownership tracking, and automatic recovery
- Declared Guarantees: a per-backend guarantee matrix (atomic publication, exactly-once trigger firings, stale-owner recovery, ordering, durability, delayed retries) served at
/api/capabilities, with every guaranteed cell backed by process-kill tests that gate releases - Pluggable Backends: Swap between in-memory, SQLite, Redis, PostgreSQL, MongoDB, and RabbitMQ backends via feature flags
- Concurrency Control: Four levels (Unlimited, Task, Argument, None) enforced at both registration and execution time
- Queues and Priorities: Named logical queues, configurable runner selection, and finite float priorities with FIFO ties
- Trigger System: Event-driven and cron-scheduled task execution with durable event/run evidence in memory and SQLite
- Client Data Store: SHA-256 content-addressed external storage for large arguments/results with LRU caching
- Workflow System: Explicit
#[rustvello::workflow]roots, child identity propagation, and root-scoped deterministic replay - Recovery & Heartbeat: Automatic detection and re-routing of stale invocations from crashed runners
- Monitoring Dashboard: Browser-based UI for invocations, runners, workflows, trigger evidence, and timelines (Axum + Askama + HTMX)
- Cross-Language Support: Closed
TaskLanguage, canonicallanguage::module.nametask IDs, typed foreign tasks, and physical language queues - Builder Pattern: Fluent configuration with env var overrides (
RUSTVELLO__*), TOML file support, and.memory()/.sqlite()presets - Python Bindings: Full PyO3 bridge for standalone Python usage and optional pynenc integration
- CLI Tool: Run workers, inspect invocations, and purge data from the command line
- Shared Test Suite: Macro-generated backend compliance tests ensuring all implementations satisfy the same contracts
Installation
Rust
Feature flags:
mem(default) — in-memory backendssqlite— SQLite backendsredis— Redis backendsmongodb— MongoDB backendsmongodb3— MongoDB backends (legacy driver v2)rabbitmq— RabbitMQ backendspostgres— PostgreSQL backendsfull— all backends
[]
= { = "0.8", = ["sqlite"] }
= { = "1", = ["macros", "rt-multi-thread"] }
Python
CLI
Quick Start (Rust)
Tasks are submitted by producers and executed by workers that share a backend. This example runs both in one process on a local SQLite file:
use Duration;
use *;
// Define a task with the proc macro
async
call() returns at once; wait()/wait_timeout() poll until a worker finishes
the invocation. result() only reads a finished invocation and errors while it
is still pending. For local tries without a worker, .dev_mode(true) on the
builder makes call() run the task inline.
Quick Start (Python)
=
return +
= # deterministic helpers, recorded for replay
return
# A worker executes what you submit. In production it is its own process:
# python -m rustvello.worker my_module:app
# Here it runs in a background thread of this script.
# 3
result(timeout=...) blocks until a worker finishes the task and raises
TimeoutError if none does, so something must run app.run() or
python -m rustvello.worker. For tests and local tries, run tasks inline instead:
# Tasks run inline in the caller: no worker needed. Handy for tests and
# local tries; RUSTVELLO__DEV_MODE_FORCE_SYNC=true does the same without code.
=
return +
# 3
Using Rustvello from an agent
skills/rustvello is an agent skill (the common
SKILL.md format, no MCP server needed): setting up an app, workers, retries,
timeouts, triggers, cancellation, choosing a backend and investigating a failed
invocation, with examples that CI runs against the built wheel.
llms.txt indexes the documentation, and evals/
measures how well models install, use and recommend Rustvello.
Pynenc Integration
Rustvello also serves as an optional high-performance backend for pynenc.
Install the plugin with pip install pynenc-rustvello to use Rust-powered backends inside pynenc apps:
=
return +
= . # 3
Development
Prerequisites: Rust 1.85+, Python 3.12+, uv, maturin
# Install dependencies and pre-commit hooks
# Run all checks (Rust + Python + pre-commit)
# Run all tests (Rust + Python)
# Build the Python wheel
# Build and serve docs locally
Run make help for the full list of targets.
Contributing
See CONTRIBUTING.md for guidelines on reporting bugs, submitting PRs, commit conventions, and the development workflow.
Contact or Support
- GitHub Issues: Bug reports and feature requests
License
Rustvello is released under the MIT License.