reef/lib.rs
1//! # Reef
2//!
3//! Runtime crate for [Reef](https://reef.rs) apps. Today this provides:
4//!
5//! - The `#[reef::table]` schema-as-code attribute (re-exported from `reef-macros`)
6//! - [`Json`] and [`Jsonb`] newtypes for typed JSON columns
7//!
8//! Future versions will add `Db` helpers and Dioxus convenience re-exports.
9//!
10//! ## Schema-as-code
11//!
12//! ```ignore
13//! use reef::{Json, Jsonb};
14//!
15//! #[reef::table]
16//! pub struct User {
17//! #[column(primary_key)]
18//! pub id: i64,
19//! #[column(unique)]
20//! pub email: String,
21//! pub tags: Json<Vec<String>>,
22//! pub metadata: Jsonb<UserMetadata>,
23//! }
24//! ```
25
26pub use reef_macros::table;
27
28mod json;
29pub use json::{Json, Jsonb};