Skip to main content

TeaQL Rust Core Runtime

· One min read
TeaQL Code Gen
Core Contributor

TeaQL expands into Rust. The core runtime ships with procedural macros, dual database support, and a unified id space.

Why Rust

Java served us well for enterprise backends. Rust brings zero-cost abstractions, memory safety without GC, and native performance. The goal is not to replace the Java stack but to offer a lean alternative for performance-critical services.

Procedural Macros

#[derive(TeaQLEntity)]
struct User {
id: u64,
name: String,
}

The TeaQLEntity macro derives:

  • Schema mapping
  • Query DSL methods
  • Graph relation helpers

Database Support

DatabaseSchema EnsuringStatus
SQLiteensure_schemaReady
PostgreSQLensure_schemaReady
let db = SqliteBackend::open("app.db").await?;
db.ensure_schema::<User>().await?;

u64 Id Space

All entity ids moved from i32 to u64:

  • 64-bit range eliminates overflow concerns
  • Consistent with Snowflake-style distributed ids
  • Progress tracking built into the runtime

What's Next

Graph writes and a query DSL are already in progress.