Introducing Rostfrei: A Rust Framework for Inspectable Software

· elbtech

Updated:

When AI generates more code, understanding the system becomes more important, not less. Which business rule belongs where? Why was a command accepted? Which events led to the current state? With Rostfrei, we are developing a Rust framework for domain modeling, event sourcing, and messaging. Its guiding idea: Understand your code. Even when AI wrote it.

An Alpha Framework

Rostfrei is open source under the European Union Public Licence 1.2 (EUPL-1.2). Its APIs are evolving. This introduction refers to the public documentation on October 18, 2026 and repository revision 849eec3. It is neither an independent security assessment nor a promise of production readiness.

Make Domain Structure Visible

Macros describe parts of the domain model. The command cargo rostfrei check validates its configured structure. Domain behavior stays separate from persistence and messaging adapters. This makes relationships inspectable and helps engineers and coding agents navigate the system. A structure check does not prove that a business rule was understood correctly or implemented completely.

Commands and Events Are Different Things

A command requests a business action. Handling it can produce events or reject the action. Private domain events form an aggregate's history; separately versioned integration events are public contracts. The documentation describes NATS JetStream adapters for storage and messaging. Correctness still depends on the implemented rules, operational configuration, and verified assumptions.

Separate Inspection, Simulation, and Execution

Tracer tooling distinguishes inspection, preview or simulation, testing with isolated state, and production execution. Production dispatch requires a separate capability. Exploring a model is therefore not automatically permission to modify real data. Simulating deterministic domain behavior is not, however, a general safety guarantee for external side effects.

Event History Is Not Automatically a Tamper-Proof Audit Trail

Rostfrei documents an important trust boundary: normal history reads check local structures while trusting the event store's supported write paths. Deeper historical verification uses explicit audit functions or a stricter read policy. Not all traces are stored durably either. Event sourcing alone makes a system neither tamper-proof nor legally compliant as an audit record.

Start with a Small Model

The repository includes a bike-rental example connecting commands, events, and runtime tools. It is a starting point for evaluating the framework, not a replacement for assessing your own use case. Simpler architecture may be better for straightforward CRUD applications. Rust and explicit models do not replace application authentication, authorization, or tests.

Developing in the Open

For us, Rostfrei is a concrete contribution to keeping software understandable when working with and building for AI agents. It does not automatically provide a complete AI agent or a ready-made enterprise platform. Current status, architecture decisions, and setup instructions are in the repository and documentation. We want to discuss problems, limitations, and appropriate use cases as openly as new features.