Developers use Topaz to build and operate real products, including a compiler, browser tools, and games. Follow the links on this page to read their Topaz source code directly.
The Topaz self compiler
The core of the Topaz compiler is written in Topaz. Besides reading source and checking names and types, it lowers programs to the intermediate representation used for execution and generates Rust code. Building the final native executable uses the Rust toolchain and separate host and runtime components. As Toolchain Status describes, it is the default compiler for most commands, including topaz check, run, and build.
The compiler's Topaz source lives under compiler/crates/topaz_self_frontend/. Lowering lives in lowering.tpz and Rust code generation in the emitter/ folder. Read this source on slow.monster (external). From 5.21, the compiler seed published with each release also contains it.
ATLAS
ATLAS (external) is a typesetting tool that turns manuscripts into book pages and a print-ready interior PDF.
ATLAS writes its line-breaking rules in Topaz. The source panel on the ATLAS home page shows five Topaz files. Four are the steps 금칙분류, 나쁨도, 정렬벌점, and 최적분할 (prohibited breaks, badness, alignment penalty, and optimal division), and the fifth, 줄바꿈, combines them. The function names are Korean typesetting terms, and the five files come to about 1,000 lines.
CodeImage
CodeImage (external) stores an executable program in an image and recovers source code from that image in the browser. A matching key restores the exact original source.
Its Topaz code handles program representation, image encoding, and source recovery across about 110 files and 19,000 lines. Browse the folders on the CodeImage source page (external) or read them on slow.monster (external).
Jeniapp
Jeniapp (external) offers 20 browser apps that run without installation or login. They include a SQL database, a JSON formatter, and a spreadsheet.
The apps are written in Topaz and run as WASM. Their published Topaz source spans about 60 files and 11,000 lines. Use the source button in each app or browse the collection on slow.monster (external).
kakao.games
Domain War on kakao.games (external) is a narrative text RPG based on a real domain dispute. Your choices change the course and mood of the story.
The published Topaz game code spans four files and about 450 lines. Open the game's Topaz source button or read the files on slow.monster (external).
Continue exploring
Read Introducing Topaz for language examples and History for changes to the language and tools.