Studio notes
REX Lang
A TypeScript-shaped language we’re building in public — pointed at the next decade of how we ship.
Note
Studios usually inherit their stack. Frameworks, formats, editor habits — someone else drew the rails. REX Lang is our refusal of that default. It’s a TypeScript-like language that compiles to TypeScript, with real Cursor and VS Code IntelliSense, because we want the surface we write on to belong to us.
Creative work that lasts needs infrastructure that can still move. REX is that bet — built in motion, on purpose.
Not a toy. A real pipeline.
REX is evolving by design. We’re shipping a compile pipeline we already use: parse into a source AST, plan edits with MagicString, emit TypeScript that the rest of the world already understands.
The point isn’t novelty for its own sake. It’s leverage. If the language owns the sugar, we can evolve how we express systems without abandoning the TypeScript ecosystem — Vite, tsserver, Prettier, the whole orbit.
Shape of the language
Namespaces are top-level and brace-less — members run until the next namespace, import, or end of file. Functions can drop the ceremony: name() becomes an export. From TypeScript you import .rex with an explicit extension, so the boundary stays clear.
namespace Math
add(a: number, b: number): number {
return a + b
}
scale(n: number, factor = 2) {
return n * factor
}Under the hood, loose top-level members get a file-default namespace. Nested TypeScript stays intact — generics, object types, arrow shapes — because the interiors are scanned as balanced regions, not flattened guesses. REX owns the skeleton; TypeScript still owns the muscle.
The editor is half the language
A language needs a home in the editor. REX ships with a VS Code / Cursor extension: TextMate highlighting, a Volar-backed language server, diagnostics, completions, hover, go-to-definition. There’s a tsserver plugin so .ts can import .rex without breaking the graph. Prettier formats through a REX plugin that keeps TypeScript interiors on Prettier’s own parser.
That’s the future-proof move: don’t invent a parallel universe. Invent a better doorway into the one that already runs production.
Why a studio builds this
Client work moves fast. Internal tools move faster. The cost of rewriting the same patterns — namespaces, module boundaries, the little sugar that makes a codebase feel like ours — adds up. REX is how we compress that tax into the language instead of into every repo’s conventions doc.
Future-proof isn’t frozen. It’s editable. REX compiles forward so we can keep changing how we think.
We’re building CLI flows (bun rex build / run), a Vite transform, Metro support, and language-service packages — the scaffolding that makes a language feel inevitable. The foundation is already load-bearing.
Creative infrastructure
This post is a field note. REX Lang is the kind of studio project that only makes sense if you believe craft includes the tools under the craft — and that those tools should age on your terms.
We’ll keep writing here as the language hardens: grammar decisions, editor quirks, the moments when sugar becomes load-bearing. For now: it compiles, it lives in the editor, and it’s pointed at a future where R3X doesn’t just ship products — it ships the medium those products are written in.
