Skip to content

Where Dazzle stands

Dazzle compiles and runs programs with no undefined behaviour outside unsafe, about as fast as the same programs in C++. It places memory itself, calls C and C++ libraries built from source, has a language server, and already carries a complete game and a real-time 3D scene. It is young: the standard library is still growing, and the editor still lacks some code actions and incremental analysis. The specification is revised rather than versioned, and each compiler release (v0.1.0, v0.1.1, …) says which revision it carries.

Done lexer, parser, formatter · modules and visibility · type checker · C++ code generation · ownership · ties and kills clauses · borrowed views · no undefined behaviour in safe code, on one thread · memory placed by the compiler, in regions by default · generics and traits · C and C++ interop from source, CMake builds included · tagged unions and switch · macros · reflection · #[inline] and link-time optimisation · dz test · dz bench and the C++ comparison suite · dz fix and dz explain · CI on three platforms, every test program also run under AddressSanitizer and UndefinedBehaviorSanitizer · releases for Linux, macOS and Windows with libclang bundled, and one-line installers
Mostly done the language server and VS Code extension: incremental analysis and the remaining quick fixes are still to come
Now more tests of the safety rules, and the cases placement still leaves on the heap; then a game of ten thousand lines, to see how the rules hold at scale. Alongside: the standard library, whose criterion, a game written without any C++ of its own, is met: examples/breakout
Later dependencies fetched from git, Dazzle packages and C libraries alike, pinned by a lockfile; hot reload; freestanding targets for microcontrollers; the web through Emscripten

The milestones are in spec §19, and the open work, task by task, is the backlog.

How fast it is today: three whole programs, each written idiomatically in both languages and built by the same compiler, take 0.77 to 1.17 times as long in Dazzle as in C++: A* search is faster than C++, mostly through its hash map, the word count is even, and the parser and evaluator is the one still behind. The benchmarks have every run, and what is left.

  • Platforms: Windows, Linux and macOS. CI builds and tests on all three for every change.
  • C++ compilers: clang++ and g++. The generated code is C++17, compiled with -fno-exceptions -fno-rtti and warning-clean under -Wall -Wextra on both; clang++ 19 and 21 and g++ 13 and 14 are verified. MSVC’s cl.exe is not supported.
  • C and C++ libraries: C, and C++ through namespaces, classes, methods, overloaded methods, references and named template instances. Overloaded free functions, variadic C functions and inheritance between imported C++ classes are not imported yet.
  • The output is plain C++, so anything that links with C++ links with Dazzle.

Dazzle is built with AI. The language’s design is its author’s: its syntax and semantics, and every decision recorded in the design decisions. The compiler, its tests and much of the documentation are written by Claude, Anthropic’s AI model, working from that design and the specification.

MIT.