raz

A small systems language in Wirth’s tradition, for x86-64 Linux. Raz is Polish for one, as in counting.

Take the tour: Raz, Set, Go More Raz Download Read the report Browse the source

A raz program can lay a record over a device’s registers, read and write memory exactly as written, take part in lock-free algorithms, make system calls and call C libraries. It has no garbage collector and no hidden run time: what the program does is what its text says.

The compiler is written in raz, about 10,700 lines, and builds itself. It makes x86-64 machine code and the ELF file itself, with no assembler or linker, in one pass, at about 500,000 lines a second.

~10,700 lines of compiler ~500K lines compiled a second 1 report, @PAGES@ pages static executables, no run time to install

A taste

Taste.raz
@SNIPPET@
@OUTPUT@

What it has

Learn it

Raz, Set, Go is a tour of the language in 15 lessons, each with programs you can run. More Raz is the second tour: the library, programs with no run time, procedures in assembly, system calls, volatile accesses, atomics and lock-free code, in 18 more.

The language, in writing

The language is defined by the report, which is short on purpose: whatever it doesn’t allow, raz doesn’t have. Its second volume describes the library. Both are on one page, and each is a PDF: the language (@PAGES@ pages) and the library.

Download

raz @VERSION@ is a tarball for x86-64 Linux with the compiler, raz, its library, lib/, which it finds beside itself, the formatter and the documentation tool as sources in tools/, and the manual pages. It needs nothing else installed.

Download raz @VERSION@ SHA-256
$ tar xzf @TARBALL@
$ ln -s $PWD/@DIR@/raz ~/.local/bin/raz
$ raz run Hello.raz

The link works since raz finds lib/ beside its real path. The manual pages are in man/: man ./man/raz-tutorial.7. The address download/latest always leads to the newest release, and download/raz-@VERSION@-linux-x86_64.tar.gz to this one, for good. Earlier releases: @EARLIER@; each has its SHA-256 beside it, with .sha256 added to its name.

SHA-256 @SHA256@

Release pages give each version's commit, notes, compiler and source archives, with checksums. Browse the source and history, or clone: git clone https://raz.lucelad.workers.dev/source/.