3 releases

new 0.1.2 Apr 15, 2025
0.1.1 Apr 15, 2025
0.1.0 Apr 15, 2025

#927 in Parser implementations

Download history 222/week @ 2025-04-10

222 downloads per month

MIT license

18KB
270 lines

Rioc - Rust IOC/DI Framework

A lightweight Inversion of Control (IoC) and Dependency Injection (DI) framework for Rust applications.

Features

  • Dependency injection container
  • Interface-based programming support
  • Lightweight and fast
  • Thread-safe implementation

Installation

Add this to your Cargo.toml:

[dependencies]
rioc = "0.1.0"

Basic Usage

use rioc::containers::Container;

// Define your interfaces and implementations
// ...

// Create a container and register your dependencies
let mut container = Container::new();
container.register::<dyn MyInterface, MyImplementation>();

// Resolve dependencies
let service: Box<dyn MyInterface> = container.resolve().unwrap();

Documentation

Coming soon...

License

MIT

Dependencies

~1–1.9MB
~40K SLoC