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: Text → Parse → AST → SQL StringParse → Execute
QAIL: AST → Wire Protocol Bytes → Execute No strings. Direct.
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
🌐

WASM / Node

npm i qail-wasm ✓ Stable
Python

Python

pip install qail ✓ Ready
🐹

Go

go get qail-lang/qail-go ✓ Ready
🐘

PHP

composer require qail/qail ✓ Ready

Java

com.qail:qail ✓ Ready

C / C++

libqail_ffi.a via FFI

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.