8 releases

Uses new Rust 2024

0.0.0 Dec 16, 2020
0.0.0-alpha.8 Mar 8, 2026
0.0.0-alpha.6 Feb 15, 2026
0.0.0-alpha.4 Oct 5, 2025
0.0.0-alpha.3 Aug 3, 2025

#688 in Asynchronous

Apache-2.0

13KB
259 lines

MicroRust

MicroRust Application Framework

A modern rust application framework, asynchronous and with batteries included.

Inspired by frameworks like Spring Boot, Micronaut and Quarkus.

Features

  • Dependency Injection

Examples

Dependency Injection

use microrust::inject::{get_instance, singleton};

struct MyStruct {}

#[singleton(new)]
impl MyStruct {
    pub fn new() -> Self {
        println!("MyStruct::new() called");
        Self {}
    }

    async fn print(&self) {
        println!("Hello, MyStruct");
    }
}

#[tokio::main]
async fn main() {
    let inst = get_instance::<MyStruct>();
    // let inst: Arc<MyStruct> = get_instance();
    inst.print().await;
}

Dependencies

~10–13MB
~160K SLoC