Oximod
A MongoDB ODM for Rust
Overview
Oximod is a schema-based Object-Document Mapper (ODM) for MongoDB, designed for Rust developers who want a familiar and expressive way to model and interact with their data.
Inspired by Mongoose, Oximod brings a structured modeling experience while embracing Rust's type safety and performance. It works with any async runtime and is currently tested using tokio.
Features
-
Schema Modeling with Macros
Define your collections using idiomatic Rust structs and a simple derive macro. -
Async-Friendly
Built for asynchronous Rust. Integrates seamlessly with themongodbdriver. -
Built-in CRUD Operations
Usesave(),find(),update(),delete(), and more directly on your types. -
Minimal Boilerplate
Declare a model in seconds with#[derive(Model)],#[db], and#[collection]attributes. -
Clear Error Handling
Strongly typed, developer-friendly errors based onthiserror.
Example
use set_global_client;
use Model;
use Model;
use ;
use ;
async
Running Examples
Monoxide includes a growing set of usage examples:
Each file clears previous data on run and demonstrates isolated functionality.
Don't forget to create a
.envfile:MONGODB_URI=mongodb://localhost:27017
License
MIT © 2025 Oximod Contributors
⚠️ The name Oximod and this repository represent the official version of the project.
Forks are welcome, but please do not use the name or create similarly named organizations to avoid confusion with the original.
We hope Oximod helps bring joy and structure to your MongoDB experience in Rust.
Contributions welcome!