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 Topaz compiler front end is written in Topaz. It handles lexical analysis, parsing, name resolution, and type checking. It is the default compiler for topaz check, as described in Toolchain Status.
The Topaz source under compiler/crates/topaz_self_frontend/ spans 56 files and about 42,000 lines. Read it in the Topaz source browser or on slow.monster.
ATLAS
ATLAS is a typesetting tool that turns manuscripts into book pages and a print-ready interior PDF.
Its landing page includes a specification excerpt written in Topaz for calculating line-breaking badness. This score measures how well a line fits its target width. Select the badness example to read about 60 lines of Topaz.
CodeImage
CodeImage 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 40 files and 18,000 lines. Browse the folders on the CodeImage source page or read them on slow.monster.
Jeniapp
Jeniapp 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 WebAssembly. 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.
kakao.games
Domain War on kakao.games 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.
Continue exploring
Read Introducing Topaz for language examples and History for changes to the language and tools.