02 / The pipeline
One class becomes the whole stack.
Curious what happens after you save? Here's the tour. Write a class once, and the data layer, the storage and the deployment all follow from that one file — you don't have to wire any of it together yourself.
01
Write the classes
Plain TypeScript classes are the single source of truth — fields, constraints and relations live in the type system. No DSL.
02
The contract compiles itself
No compile command, no schema wiring. The rastack/plugin bundler plugin (or rastack dev) derives the manifest from your classes on every save and registers it before the app boots; CI emits the OpenAPI contract on deploy. Types never come from this step — they flow from the class as-is.
03
The engine stores it
A stateless Rust API persists every model as an Apache Iceberg table on object storage.
04
Ship it serverless
Rust on Lambda, S3 as the system of record. Scale to zero, scale to millions.
Read the full guide →
entities/airports.ts
ts · copy
1
import
{ MaxLength, Unique }
from
"rastack/db"
;
2
3
export class
Airport
{
4
code
!:
string
&
Unique
&
MaxLength<3>
;
5
name
!:
string
;
6
}
7
8
export class
Terminal
{
9
airport
!:
Airport
;
// foreign key — inferred
10
label
!:
string
;
11
}