| Crates.io | qail-gateway |
| lib.rs | qail-gateway |
| version | 0.1.0 |
| created_at | 2026-01-10 11:04:43.394633+00 |
| updated_at | 2026-01-10 13:38:46.673007+00 |
| description | QAIL Gateway - Native data layer replacing REST/GraphQL |
| homepage | |
| repository | https://github.com/qail-io/qail |
| max_upload_size | |
| id | 2034047 |
| size | 69,634 |
The Native Data Layer — Replace REST/GraphQL with Binary AST Protocol
┌─────────────────────────────────────────────────────┐
│ Client (Web/Mobile/CLI) │
│ └── qail-js / qail-swift / qail-rs │
├─────────────────────────────────────────────────────┤
│ QAIL Gateway (this crate) │
│ ├── HTTP/WebSocket endpoint │
│ ├── AST validation against schema.qail │
│ ├── Row-level security policies │
│ └── Direct Postgres binary protocol │
├─────────────────────────────────────────────────────┤
│ PostgreSQL / Qdrant / Redis │
└─────────────────────────────────────────────────────┘
This crate is in early design phase. See DESIGN.md for architecture decisions.
| Feature | REST | GraphQL | QAIL Gateway |
|---|---|---|---|
| Wire format | JSON | JSON | Binary AST |
| Latency | ~10ms | ~10ms | ~1ms |
| Client SDK | - | 50KB+ | ~5KB |
| Row security | Manual | Manual | Built-in |
postgres., qdrant., redis.)use qail_gateway::Gateway;
#[tokio::main]
async fn main() {
let gateway = Gateway::builder()
.schema("schema.qail")
.database("postgres://localhost/mydb")
.policy("policies.qail")
.build()
.await?;
gateway.serve("0.0.0.0:8080").await?;
}
# In policies.qail
policy users_own_data {
on: users
filter: id = $auth.user_id
allow: read, update
}
policy admin_full_access {
on: *
when: $auth.role = 'admin'
allow: *
}
Long-term vision: 2026-2027