slave-framework 0.9.1

Runtime for slave apps (a Laravel-inspired Rust framework for MCP-first apps): server lifecycle, config, logging, a Toasty database (PostgreSQL), and OpenID Connect sign-in
Documentation

slave-framework

The runtime behind applications created with slave, a Laravel-inspired Rust framework for MCP-first apps. You normally get it through slave new rather than adding it by hand.

Module Provides
server serve(router, host, port): an Axum server with graceful shutdown on Ctrl+C / SIGTERM
env .env loading and typed settings (var_or, parse_or)
logging tracing setup driven by RUST_LOG
database (feature database) The Toasty connection pool for the app's models, on PostgreSQL (DATABASE_URL, default postgresql://localhost:5432/postgres; sslmode for TLS). Migrations are Toasty's (toasty-cli)
oidc (feature oidc) Sign-in through an OpenID Connect provider: OidcVerifier checks ID tokens (signature via JWKS with key rotation, issuer, audience, expiry); OidcClient runs the Authorization Code flow with PKCE for server-rendered apps. No passwords are handled.
testing (feature testing) TestDatabase (a fresh PostgreSQL database per test on TEST_DATABASE_URL) and TestIdentityProvider (a tiny, insecure OIDC provider) for integration tests and local development

database and oidc are on by default. Template apps in a slave workspace use default-features = false plus oidc (for sign-in); the backend's tests add testing.

#[tokio::main]
async fn main() -> slave_framework::Result<()> {
    slave_framework::env::load_dotenv()?;
    slave_framework::logging::init()?;
    let router = axum::Router::new();
    slave_framework::server::serve(router, "127.0.0.1", 3000).await
}

See the slave README for the full framework. License: MIT.