cobalto

Crates.iocobalto
lib.rscobalto
version
sourcesrc
created_at2025-05-07 15:31:00.82143+00
updated_at2025-05-07 15:31:00.82143+00
descriptionA fast, batteries-included web framework for Rust, inspired by Django and Laravel.
homepage
repositoryhttps://github.com/cobaltoproject/cobalto
max_upload_size
id1664025
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(cobaltoproject)

documentation

README

Cobalto

Cobalto is a fast, batteries-included web framework for Rust, inspired by Django and Laravel.

  • 🚀 Modern async, real-time, and HTTP API support out of the box.
  • 🔌 Batteries-included: template engine, live reload, middleware, and easy routing.
  • 🦀 Built for Rustaceans: safe, robust, and professional.

Features

  • Easy, familiar route/handler syntax
  • User-friendly middleware API
  • WebSocket support with route matching
  • Live reload for development
  • Django-style template engine with blocks and inheritance

Quickstart

Add Cobalto to your Cargo.toml:

[dependencies]
cobalto = "0.1"

Example entrypoint:

use cobalto::router::*;

#[tokio::main]
async fn main() {
    let mut router = Router::new();
    router.add_route("/", Arc::new(|_| Box::pin(async { Response::ok("Hello, Cobalto!") })), vec![]);
    // Register more routes, websockets, and middlewares here.
    let settings = cobalto::settings::Settings {
        debug: true,
        host: "127.0.0.1".to_string(),
        port: 8080,
        ws_port: 9000,
        // ...
    };
    router.run(settings).await.unwrap();
}

Testing

Run all tests:

cargo test

Check code coverage:

cargo tarpaulin

Contributing

See CONTRIBUTING.md for details.

License

MIT

Happy building with Cobalto!

Commit count: 0

cargo fmt