
🌍 Atmosphere
A lightweight sql framework for sustainable database reliant systems
Overview
Atmosphere is a lightweight SQL framework designed for sustainable, database-reliant systems. It leverages Rust's powerful type and macro systems to derive SQL schemas from your rust struct definitions into an advanced trait system.
Key Features
- SQL schema derivation from Rust structs.
- Advanced trait system for query generation.
- Automated database code testing with
atmosphere::testing - ORM-like CRUD traits.
- Code reusability across API layers using generics.
- Compile-time introspection for type-safe schema generation.
Quickstart
use *;
use PgPool;
async
Atmosphere introspects the User struct at compile time and generates const available type information
about the schema into the Table trait:
Roadmap
Alpha Release
- Advanced SQL Trait System (
Table,Column,Relation..) - Derive Macro (
Schema) - Field Attributes (
#[primary_key],#[foreign_key]and so on) - SQL Query Generation
- Automated Integration Testing
- Attribute Macro (
#[table])
Beta Release
- Transaction Support
- Hook into query execution using
atmosphere::hooks - Virtual Columns using (
#[virtual = "<sql>"]) - Getting Database Agnostic
- Errors using
miette - Attribute Macro (
#[relation]) - Attribute Macro (
#[query])
Stable Release
- Custom queries
- Stabilize Traits
- Provide Application Utils
- Stabilize Query Generation
- Table Lenses (subsets / views)
Advanced
- Postgres Composite Types
- Support custom types
- Runtime Inspection
- Generate Graphs
-
validatorsupport
Longterm
- Generate GraphQL + HTTP Servers?
Contribution
We welcome contributions! Please see our contribution guidelines for more details.
License
Atmosphere is licensed under Apache 2.0.