Compiles to portable C
U is a systems language where the safe path and the fast path are the same path. Write the obvious code — the compiler handles memory, concurrency, and vectorization. No garbage collector — cycles prevented at compile time. No data races, no ceremony. LLMs generate correct U on the first try because the defaults are already safe.
// Parameters are read-only by default.
// Shared without a lock, copied without a care.
f describe(cfg: Config) -> S
r => "{{cfg.name}} v{{cfg.version}}"
// +V says: these lanes are independent.
// The C that comes out uses real SIMD.
f scaleAll(arr: [I +V] +R) -> [I +V] +R
r => arr.map(val => val * 3)
U is a transpilation target. Drop in a PHP, JavaScript, or TypeScript codebase. The transpiler converts it to U. The compiler compiles U to C. GCC compiles C to a native binary. What you get back is a compiled program that serves HTTP, not an interpreter running your code.
A real 8-file PHP app — classes, request/response, user model, route handlers —
transpiled through the pipeline and benchmarked against the original.
The compiled binary serves 14,275 req/s on /health and 5,689 req/s on /api/users.
PHP 8.3 does 800 req/s on the same workload. Node.js does 2,444.
These are measured numbers, not projections.
No V8 (60MB). No PHP interpreter (30MB). No node_modules. The compiled binary is a single file with zero dependencies. It starts in microseconds, uses 2MB of RAM, and fits in an L2 cache. Deploy it to a container, a Lambda function, an edge node, or an IoT device. Ship it by email.
The transpiler maps 1,246 PHP functions — 132 to native U operations (fast path),
1,114 through a bridge to the real PHP C implementation (compatible path).
strlen becomes a pointer subtraction. gzdeflate calls
the actual zlib. Your code doesn't change; the runtime underneath does.
Every request gets an arena — a single block of memory that all allocations come from. When the request ends, one pointer reset frees everything. No reference counting, no garbage collector, no individual free() calls. The arena allocates at 406M ops/s — 200× faster than malloc. PHP-FPM's request isolation, without forking.
122 PHP edge cases (string, math, array, type, control flow, OOP, operators). 100 JS edge cases (array methods, string methods, classes, modern JS, TypeScript). 46 transpiler mapping tests. 4 compatibility bridge tests. 636 compiler tests. Every run: zero failures.
Preload your classes, config, and routes once at startup. Take a snapshot.
Each request gets a copy-on-write view — reads are free, writes go to the
request arena. No fork() syscall, no process overhead, no TLB flush.
Simulated pcntl_fork() via threads gives PHP fork semantics
on Linux, macOS, and Windows.
Same app logic, same routes, same JSON output. Real measurements with Apache Bench.
| Server | req/s | Binary | vs PHP |
| Compiled (from PHP) | 70,026 | 22 KB | 87× |
| Compiled (from JS) | 65,374 | 22 KB | 82× |
| Node.js http | 2,444 | ~60 MB | 3× |
| PHP 8.3 -S | ~800 | ~30 MB | 1× |
Workload: /api/users — build 50 User objects, paginate, serialize to JSON, serve over HTTP with keep-alive.
Compiled binaries from hand-written C equivalents. Real transpiled pipeline with arena: 21K req/s (/api/users), 17K req/s (/health) — 26× PHP, 7× Node.
Keep writing PHP. The transpiler handles the conversion. Your 8-file Qbix app becomes a 22KB binary that serves 70K req/s. No PHP-FPM, no opcache tuning, no memory_limit headaches. The arena allocator gives you PHP's per-request isolation without the fork overhead.
Your Express routes, middleware, and models compile to native code. CORS headers, request logging, JSON serialization — all compiled. 65K req/s instead of 2.4K. No node_modules directory, no V8 memory overhead, no event loop blocking. The binary is 22KB.
A 22KB binary runs anywhere — Cloudflare Workers, AWS Lambda, a Raspberry Pi, a smart thermostat. It starts in microseconds and uses 2MB of RAM. Your entire API fits in a Docker scratch container with nothing else in it. No runtime to install, no interpreter to patch, no CVEs to track.
A $5/month VPS running compiled PHP serves the traffic that would normally need a $50/month setup. Or run 87 tenants where you used to run one. The compiled binary uses a fraction of the memory and none of the per-request startup cost that PHP-FPM charges.
Compiled binaries are hard to reverse-engineer. Your business logic, database schema, and API keys don't ship as readable source. The compiler's capability system flags credential exfiltration and SQL injection at compile time. The binary is the security boundary.
You don't need to learn U to use U. The transpiler converts your existing PHP or JS codebase. Where the transpiler can't handle an edge case (6 corrections for an 8-file app), you hand-correct once and commit. As the transpiler improves, those corrections disappear. Your PHP knowledge is the starting point, not a liability.
Apple rejects apps that call undeclared private APIs. U does the same thing — at compile time, for every possible side effect, and with cryptographic proof that the check happened.
You declare entitlements. The App Store reviews your binary.
If you call _LSOpenURLsWithRole without declaring it, you're rejected.
But this is a review — it happens after you build, it can miss things,
and the sandbox is a runtime fence that sufficiently motivated code can probe.
Functions declare +E(DbRead, HTTP) — their exact effects. The compiler
rejects code that calls outside its grant. This isn't a review; it's a proof.
The compiled binary physically cannot make an unauthorized network call because
the instructions don't exist in it. There's nothing to probe.
A function with +E(DbRead) can read the database
but can't write to it, can't make HTTP calls, can't touch the filesystem.
A function with no +E is pure — zero side effects, guaranteed.
If processOrder calls sendEmail,
the compiler requires processOrder to declare +E(Email).
Capabilities propagate up the call graph. Nothing hides.
DbRead + HTTP on the same call path = data exfiltration vector.
The compiler flags it. DbRead + Email = same. The dangerous combination is
caught at compile time, not in a post-breach audit.
When an LLM writes code, or when a plugin runs inside your application, or when third-party code executes in your infrastructure — you need to know what it can do. Sandboxes are runtime fences; they stop bad behavior after it starts. Capabilities are compile-time proofs; the bad behavior can't be compiled into existence.
Safebox runs compiled U code in a pristine environment. The environment doesn't need a complex
sandbox because the binary's capability manifest is a cryptographically signed proof of what
the code does. The runtime just verifies the signature and runs the code. If the manifest says
+E(DbRead, Config) and nothing else, that's all the binary can do — not because
of a fence, but because of the instruction set.
This is the difference between "we reviewed the code and didn't find anything bad" and "the code structurally cannot do anything bad." The first is an opinion. The second is a proof.
Every safety property comes from one system: modifiers on types. No separate borrow checker, no async runtime, no SIMD intrinsics to learn. One mechanism, six benefits.
Variables live on the stack by default — fast, automatic, freed when the
function returns. When you need a value to outlive the function, add
+R and the compiler tracks who's using it (like Swift's ARC).
Circular references — the classic memory leak — are caught at compile time,
not at runtime. No garbage collector, no pauses, no manual memory management.
Prefix any call with a to run it as a fiber — a lightweight
async task. There's no async/await split, no colored functions,
no thread pool boilerplate. A function that works synchronously works
asynchronously too — the caller decides, not the definition. Fibers suspend
and resume automatically; the compiler handles the scheduling.
Add +V and the compiler processes your data in parallel lanes
automatically. The emitted C uses vector types that become SSE or AVX on
x86, NEON on ARM, and WebAssembly SIMD in the browser. You don't write
intrinsics or platform-specific code — just annotate the data. If the
operation can't safely vectorize, you get a compile error, not a silent
wrong result.
+R(GPU) puts data in device memory and turns a
.map() into a GPU compute shader. The same code runs in the
browser through WebGPU and natively through Dawn — one source file, every
device. No CUDA toolkit, no separate shader language, no manual buffer
management. If the data doesn't fit the GPU model, the compiler tells you.
Parameters can't be changed. Fields outside your own instance can't be
changed. To make something mutable, you write +M — an explicit
opt-in, visible at the declaration. Shared state goes through atomic
<< patches. Data races are compile errors, not crashes
you discover in production at 3 AM.
U emits ordinary C11 that you can read, debug, and compile with the toolchain you already have — gcc, clang, MSVC. No virtual machine, no runtime library to ship, no dependency on a specific OS version. The same source also compiles to WebAssembly through Emscripten, so one codebase runs natively and in the browser.
A single function signature tells you everything: f+E(DbRead, HTTP) +A get_user(...) -> User +N ! NotFound
— async, reads the database, handles HTTP, might return null, might throw NotFound.
No inference needed, no compiler run, no tracing call stacks.
The compiler infers capabilities from the code (--suggest-caps), warns about
dangerous combinations (DbRead + Email = exfiltration), and template tags
like sql`INSERT ...` automatically route to the right capability check.
An LLM auditor reads function signatures and reasons about attack vectors
without ever reading the body.
Garbage collection. Null exceptions. Data races. Async coloring. SQL injection.
Off-by-one errors. Each one has a state-of-the-art solution — and each solution has a cost.
U eliminates all 26 at the root, through the same modifier system, and they compound:
-M prevents races AND enables vectorization. -E enables memoization AND
deterministic testing. There is one way to do each thing, and that one way composes with everything else.
U makes security analysis fall out of the code itself. Every function signature declares its full contract — what effects it has, what capabilities it needs, what errors it throws, what it returns. The compiler enforces all of it. But the real power is what this enables beyond the compiler:
Functions declare +E(DbRead, HTTP) — exactly which I/O they can do.
Pure functions need no capabilities at all. The compiler rejects any call outside the granted set.
Capabilities compose: WebHandler = HTTP + Config + Session.
The compiler generates a Merkle DAG of the call graph with capability annotations at each node. Change one function's capabilities, only that branch re-hashes. M-of-N cryptographic signatures from auditors (human or LLM) gate deployment. More restrictive changes auto-approve.
An LLM reads function signatures and the capability call graph — no body analysis needed. "This function has DbRead + Email — data exfiltration vector." The notation IS the analysis. The LLM signs the manifest with its reasoning.
If function A has DbRead and calls function B which has Email, A's transitive surface is DbRead + Email. The manifest captures this. Auditors reason about capability combinations — exactly how real attacks work.
secrets → fetchsecrets → log()15 mechanical analyses. No LLM needed. Every warning names the line, the variable, and the risk.
Pick one. The code below is real, and so is the C beside it — both come straight out of the compiler.
No framework, no ORM boilerplate, no threading library. The handler is a function. The query compiles to parameterized SQL. The transaction retries on conflict automatically.
// ── Schema ────────────────────────────────────────── d User : Database.Row name: S email: S score: I // ── Handlers — pure functions: Request in, Response out ── f list_users(req: Request) -> Response users = Database.Query({ store: "users" }) .select(["name", "email", "score"]) .orderBy("score", "DESC") .limit(50) .fetchAll() r => Response({ body: JSON.encode(users) }) f create_user(req: Request) -> Response ! ValidationError body = JSON.decode(req.body) body.name.len < 1 ? x ValidationError("name required") user = User({ name: body.name, email: body.email, score: 0 }) user.save() r => Response({ status: 201, body: JSON.encode(user) }) f award_points(req: Request) -> Response // Transaction: both users update atomically, or neither does << ( sender = Database.Query({ store: "users" }).where("email", "=", req.query["from"]).fetchRow() recipient = Database.Query({ store: "users" }).where("email", "=", req.query["to"]).fetchRow() sender.score < 10 ? x Rollback("not enough points") sender << { score: sender.score - 10 } recipient << { score: recipient.score + 10 } ) r => Response({ body: "transferred" }) // ── Start ─────────────────────────────────────────── f main() -> none serve(8080, { "GET /users": list_users, "POST /users": create_user, "POST /award": award_points })
What the compiler enforces in this code — without a single annotation beyond what you see:
• req is -M (parameter default) — handlers can't corrupt the request
• sender.score read inside << ( ) is a snapshot — retries on conflict automatically
• sender << { score: ... } is an atomic MVCC patch — no lock, no mutex
• Rollback exits the transaction cleanly — neither update applies
• ! ValidationError in the signature — the caller knows exactly what can fail
• The query builder compiles to parameterized SQL — no injection, ever
Today's AI coding tools spend 54% of their tokens re-reading your codebase. U eliminates that cost. The modifier system makes every function's contract mechanical and exact — no LLM needed to build the dependency graph, verify changes, or generate documentation. When LLMs are used, the cost is paid once and cached forever.
u keyword — the 13th keywordu f marks a function as AI-managed. The LLM generates the body.
The compiler verifies it against the type system, the modifier constraints, and
the dependency graph. The result is cached — zero tokens on subsequent builds.
Remove u to take over. Add it to delegate. One letter toggles the
human-AI boundary.
/// Rank by relevance. Prefer exact matches.
u f search(query: S, items: [Product]) -> [Product]
// Human writes the wiring
f main()
serve(8080, {
"GET /search": (req) => Response.json(
search(req.query["q"], catalog())
)
})
QU's Q type uses rational numbers — no floating-point rounding,
no epsilon comparisons, no 0.1 + 0.2 ≠ 0.3 bugs. Financial calculations,
fee splits, and voting weights are exact by default. The underlying algorithm is
described in Quotient
Tree Arithmetic (arXiv:2607.22612) — deferred division with bounded symbolic
depth and cross-subtree cancellation.
// Q arithmetic is exact — no rounding fee = amount * 3 / 100 // exactly 3%, not 2.9999... split = total / 3 // keeps the rational, never truncates fee == amount * 3 / 100 // true, always — exact comparison
U is the language. Safebots is the platform. The modifier system connects them.
+E(capabilities) — controlled I/O through typed middleware with M-of-N
governed policies. The compile-time sandbox that replaces DeterministicJS and WASM isolation.
U proves the code is safe. The Safebox enforces it. Users' data stays in their Safebox. The compiler is the first line of defense — not the last.
Safeboxes, Streams, Grokers, micropayments — the full stack for AI-native applications where trust is structural, not promised.
U is a working reference compiler, not a finished product. The status page is deliberately blunt about which features run, which are simplified, and which are still stubs — every row names its own limits.
The full reference: types, modifiers, memory model, concurrency, error handling, and the reasoning behind each choice.
How u2c is built — parser, linter, code generation, the runtime, and the decisions that shaped them.
Every feature marked Works, Simplified, or Placeholder, with the exact scope and the test that backs it.
Notes on running U in the browser: the WebAssembly path, the playground, and what still has to land.
A short tour that starts at functions and ends with a GPU kernel, with runnable snippets the whole way.
Small, copyable programs that show one idea each — and a link format for sharing your own.