Profiles
Tape programs declare a profile that controls which language features are available.
The three profiles
| Profile | Use case | Types | Memory | Targets |
|---|---|---|---|---|
t0 | Kernel, freestanding | Required | Manual only | Native only |
t1 | Applications | Required | Explicit, optional GC | VM + Native |
t2 | Scripts, prototypes | Optional (any) | GC | VM + Native |
Declaring a profile
Every file begins with a profile declaration:
tape
@profile(t1);Import restrictions
t2can import: t2, t1, t0t1can import: t1, t0 (can import t2 source — compiles it in)t0can import: t0 only
What changes per profile
t0 — freestanding
No GC, no heap unless you provide an allocator. No string (use []const u8). Can use @asm, volatile, atomics. Kernel can launch t1/t2 programs but cannot call into them.
t1 — typed application
Static types required (inferred from initializer or annotated). Compiles to native exe or DLL. Explicit memory management with optional GC. This is where most programs live.
t2 — scripting
Types optional (defaults to any). Dynamic dispatch, boxing, GC. Cannot compile to DLL. Think: JavaScript/Python-style scripting with tape syntax.
Last modified: