Skip to content

Serenade

Serenade: Rust application framework

Rust application framework.

CI codecov

Symfony-oriented application framework for Rust. Not Rails-style, not Django-style: composable kernel components and bundles around which you build products.

Serenade does not impose SQLx, SeaORM, Diesel, or Actix vs Axum for your product HTTP surface. It provides architecture, contracts, and reusable components; the application chooses persistence and UI stacks. Cargo stays the package manager; Serenade owns composition (bundles, recipes, console).

Primary consumer: rustashop - commerce product on Serenade, the way PrestaShop builds on Symfony.

What you get today

Piece Role
Kernel / lifecycle Boot, environment, bundle order, shutdown
DI + events Container, tagged services, sync dispatcher
Config TOML-first packages (config/packages/*.toml); YAML still loadable
Contracts Repository / UnitOfWork traits (no DB driver in core)
HTTP + routing Framework-agnostic request path + matcher
Actix adapter from_actix / to_actix / dispatch / dispatch_async + listen(addr, AsyncHttpKernel)
Console bin/console analogue (serenade:about, debug:container, --interactive)
Scaffolding CLI serenade new / recipe / serenade tui (ratatui recipe picker)
Make aliases make serenade, make tui, make console, make ci, …
App (domain + adapters)
  → Serenade kernel / DI / events / HTTP / console
      → your ORM choice (SQLx, SeaORM, …) implementing contracts
      → your HTTP choice (Actix today; Axum-shaped adapters welcome)

Business rules run in the domain / use case before Repository::save. Technical fields (updated_at, …) stay in the app adapter or ORM hooks. See ../docs-dev/PERSISTENCE.md.

Quick start (this repo)

git clone https://github.com/Interchouette-ITC/Serenade.git
cd Serenade
make ci          # lint + test + doc (stable Rust)
make help        # all targets

Scaffolding CLI

make serenade ARGS='--help'
make serenade ARGS='new demo --path /tmp'
make recipe-list
make tui ARGS='--no-cargo'          # guided recipe picker (TTY)
make serenade ARGS='recipe apply security --no-cargo'

Cargo remains the package manager (cargo add on apply unless --no-cargo). Details: ../docs-dev/RECIPES.md.

Demo console

make console ARGS='serenade:about'
make console ARGS='debug:container --plain'
make console ARGS='--interactive'   # rustyline REPL, ~/.serenade_history
make demo                           # sample app boot (prints routes / services)

Console docs: ../docs-dev/CONSOLE.md.

Actix listen helper

use serenade_http::{AsyncHttpKernel, Request, Response};
use serenade_http_actix::listen;

let kernel = AsyncHttpKernel::from_sync(|_request: &mut Request| {
    Ok(Response::text(200, "ok"))
});
// listen("127.0.0.1:8080", kernel).await?;

See ../docs-dev/KERNEL.md.

Docs

Doc Topic
../docs-dev/README.md Developer docs index
../docs-dev/VISION.md Symfony analogy, non-goals
../docs-dev/KERNEL.md Components + HTTP adapters
../docs-dev/CONSOLE.md Console Application
../docs-dev/RECIPES.md Flex-like recipes + serenade CLI
../docs-dev/BUNDLES.md Bundles and extensions
../docs-dev/WASM.md Wasm host plumbing (wasmtime CM + Wasmer WASIX)
../docs-dev/PERSISTENCE.md Contracts, adapters, domain vs hooks
../docs-dev/RUSTASHOP.md Illustrative application layout
CONTRIBUTING.md Lint bar, Make layout, PR habits
CODE_OF_CONDUCT.md Community standards
SECURITY.md Vulnerability reporting
brand/ Brand assets

Contributing

  1. Read ../docs-dev/VISION.md.
  2. Prefer Make aliases over long cargo run -p … lines (make help).
  3. Gate: make ci on stable Rust (rust-version in root Cargo.toml is the MSRV floor).
  4. One concern per PR. Commits and docs in English.

Serenade: Paris rooftop night scene

Thanks

Serenade stands on excellent open-source projects:

Project Role here
Rust Kernel crates and contracts
Tokio Async runtime for HTTP and workers
clap / cling Scaffolding CLI
ratatui Console / recipe TUI surfaces
Actix Web First HTTP adapter
Symfony (conceptual) Architectural inspiration

Thank you to their maintainers and communities.

License

Apache-2.0 (Apache License, Version 2.0). See ../LICENSE.

Serenade mark: S in circle

About

Symfony-oriented Rust application framework: kernel, DI, events, bundles, console

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages