premix-core

Crates.iopremix-core
lib.rspremix-core
version1.0.6-alpha
created_at2026-01-17 17:56:44.644864+00
updated_at2026-01-20 20:31:58.543586+00
descriptionA Zero-Overhead, Type-Safe ORM for Rust that runs optimized SQL.
homepage
repositoryhttps://github.com/premix-labs/premix-orm
max_upload_size
id2050865
size198,083
arrkpong jaroensiri (arrkpong)

documentation

README

Premix Core

The foundational library for Premix ORM.

premix-core provides the essential traits, types, and logic that power the ORM functionality. It includes:

  • Database abstraction traits (SqlDialect)
  • Executor logic (IntoExecutor, Executor)
  • Model traits (Model)
  • SQLx integration helpers

Research Status

This crate is part of a research prototype. APIs may change and production use is not recommended yet.

Installation

Most users should depend on premix-orm instead. Use premix-core directly only if you are building extensions or low-level tooling.

[dependencies]
premix-core = "1.0.6-alpha"

Quick Start

use premix_core::{Model, Premix};
use sqlx::SqlitePool;

#[derive(Model, Debug)]
struct User {
    id: i32,
    name: String,
}

async fn example() -> Result<(), sqlx::Error> {
    let pool = SqlitePool::connect("sqlite::memory:").await?;
    Premix::sync::<sqlx::Sqlite, User>(&pool).await?;
    Ok(())
}

Features

  • sqlite (default): Support for SQLite
  • postgres: Support for PostgreSQL
  • mysql: Support for MySQL (partial)

Compatibility

premix-core uses sqlx under the hood. Make sure your sqlx features match the database feature you enable here.

License

This project is licensed under the MIT license.

Commit count: 84

cargo fmt