HomePlaygroundDocsRoadmapBenchmarksStatusPhilosophyExamples GitHub

🪝 QAIL

The AST-Native Query Compiler

Build with AST. Execute with Bytes.

QAIL AST QailCmd::get("users") .select_all() .filter("active", Eq, true)
PostgreSQL SELECT * FROM users WHERE active = true
SQLite SELECT * FROM "users" WHERE "active" = 1
MongoDB db.users.find({ "active": true })
Qdrant filter: { must: [{ key: "active", match: { value: true } }] }
ORMs: Code → Parse → AST → SQL StringDB Parses Again → Execute
⚠️ Raw SQL: "SELECT..." → DB Parses → Execute Errors at runtime.
QAIL: AST → Binary Protocol → Execute Errors at compile-time.
cargo install qail
npm i qail-wasm
Rust Python Go PHP Java Node C/C++ Rust Python Go PHP Java Node C/C++

Native Rust • Universal C-API • WASM

Why QAIL?

AST-first. Native drivers. Zero transpilation overhead.

🧬

AST-First Architecture

Build queries as native data structures. No string parsing. No text-to-AST-to-text overhead.

🔌

Native Database Drivers

Direct wire protocol. No SQLx middleman. Full control over connection and execution.

🛡️

Structurally Safe

Injection impossible by design. Code and data separated at the AST level, not string level.

🌐

Polyglot by Design

Same QailCmd AST encodes to Postgres, MySQL, MongoDB, and more. Truly database-agnostic.

Zero Overhead

No runtime parsing. AST is built at compile time, serialized directly to wire protocol.

🎯

Type Safe End-to-End

Schema validation at build time. Wrong queries don't compile. Wrong types don't bind.

🦀 QAIL's Position

4% faster than C
353k vs 339k q/s
12% ahead of Go
pgx 303k q/s
16x faster
Python asyncpg ~21k q/s
View full benchmarks →

Supported Databases

One AST. Multimodal Targets. SQL and Document.

SQL-AST (Tier 1)

PostgreSQLPostgreSQL
SQLiteSQLite

Document-AST (Tier 2)

MongoDBMongoDB
DynamoDB DynamoDB
Qdrant Qdrant

Language Bindings

Native packages for your language. All powered by one Rust core.

Rust

Rust

cargo add qail-core ✓ Stable
Node.js

WASM / Node

npm i qail-wasm ✓ Stable
Python

Python

Coming Soon Planned
Go

Go

Coming Soon Planned
PHP

PHP

Coming Soon Planned
Java

Java

Coming Soon Planned
C/C++

C / C++

Coming Soon Planned

One Language. Everywhere.

Rust

Rust

qail-core + builder API

🌐

Browser

qail-wasm (~50KB)

📦

Node.js

npm install qail-wasm

Skip the String Layer.

Build with AST. Execute with Bytes.