| CARVIEW |
Dusk OS
Dusk OS is a 32-bit Forth and big brother to Collapse OS. Its primary purpose is to be maximally useful during the first stage of civilizational collapse, that is, when we can't produce modern computers anymore but that there's still many modern computers around.
It does so by aggressively prioritizing simplicity at the cost of unorthodox constraints, while also aiming to make operators happy.
Dusk OS innovates by having an "almost C" compiler allowing it to piggy-back on UNIX C code, through a modest porting effort, to reach its goals and stay true to its design constraints with a minimal effort.
The end result is a system that has a very high "power density", high enough to issue a challenge to the conventional software culture.
You can read on for more details, but the impatient among you might prefer taking the Dusk Tour.
Status
- Can run bare metal on:
- i386 (BIOS or EFI)
- amd64 (EFI)
- ARM
- RISC-V
- m68k
- List of supported targets
- Can run at native speed on top of "regular" OSes
- Can read, write, create and boot from FAT12/FAT16 (no FAT32 for now) volumes.
- Has an "almost C" compiler which, despite its "almost" qualifier, is capable of compiling quite complex "real world" code.
- Very small footprint. Designed to run smoothly on 30 years old machines. Almost anything that has a 32-bit CPU in fact.
- Simple and terse. For example, the total lines of code involved in having a fully booted bare metal i386 PC Dusk system running on a FAT16 with a C compiler, i386 assembler and a Grid text editor is less than 6000.
- It completely self-hosts on all its targets. That is, a machine running Dusk OS has all the tools necessary to either improve itself or produce a media to run Dusk OS on another machine.
- In order to bootstrap itself from something else than itself, it also has a POSIX-compatible VM written in C that is able to generate images for all its targets.
- Has almost as much documentation as code.
- Licensed under CC0, effectively placing it in the public domain.
Hardware support
- Video: VGA, VESA, RPi FB, EFI GOP, EFI UGA
- HID: PS/2, USB keyboard, USB mouse, EFI keyboard, EFI mouse
- Serial: PC COM, RPi UART
- Storage: ATA, AHCI, RPi EMMC, EFI blkio
- Bus: PCI, USB
- USB controllers: UHCI, DWC
Applications
- C Compiler
- Oberon Compiler
- Some sort of a Lisp
- Text editor
- Binary editor
- uxn and varvara
- i386/amd64 assembler and disassembler (i386-only for now)
- ARM assembler and disassembler
- RISC-V assembler and disassembler
- m68k assembler
- 6502 emulator
- Turye, a font editor
Screenshot
Dusk's console isn't very exciting to look at, but Dusk's port of Oberon, Duskberon, looks pretty good.

How terse is that thing anyway?
$ git checkout v27
$ make dusk
$ ./dusk -f fs/home/codesz.fs
Kilobytes of code in Dusk OS
Everything but /doc /data /tests /bench 898
Documentation 852
Automated tests and benches 198
Boot payload minus HAL 49
C compiler 38
Oberon compiler 49
Oberon system 226
Lisp 16
Text Editor 15
All drivers 138
This script 3
CPU-specific... i386 amd64 arm riscv m68k
Assembler 11 same 5 14 6
Disassembler 8 same 4 10
Kernel 10 9 14 14 9
HAL 7 8 9 9 7
EFI interface 4 4
Comparison points:
| Program | Version | Count command | Kilobytes of code |
|---|---|---|---|
| TinyCC | 0.9.27 | wc -c *.c *.h lib/* include/* |
1420 |
| Vim | 9.1.1825 | wc -c src/*.c src/*.h |
13849 |
| Plan 9's Acme | 9legacy | wc -c acme/bin/source/**/*.c |
63 |
| Plan 9's 8c | 9legacy | wc -c sys/src/cmd/8c/*.c |
164 |
| NASM | 3.01 | wc -c **/*.c |
1481 |
| antirez's kilo | --- | wc -c kilo.c |
40 |
Getting Dusk
Dusk OS's git repository is hosted on sourcehut. The regular way of
getting it will be to clone the repository from there. You can try to run it
directly from the master branch or you can target one of its
releases using the release tags (for example v24).
More information about how to build and run Dusk OS is available in the root README as well as in its documentation.
Becoming a Dusk operator is an involving process. It's possible that you're interested in tasting a bit of Dusk's power before you dive into this wonderful adventure of learning Forth and Dusk. You're in luck, there's the Dusk Tour which doesn't require prior Forth knowledge and allows you to dip your toes in it.
For deployments to actual machines, there's also the Dusk OS Deployments collection that can be of use.
There is also the option of building Dusk Packages on top of other OSes. You can look at Dusk Packages examples for a quick start.
Further reading
- Discuss Dusk
- Service offering
- Fund Dusk
- Why build this OS?
- Features making Dusk OS special
- Who is Dusk for?
Linking to this website
If you want to link to this website, please use https:// links rather than
https:// ones. While https:// links are trivially "upgradable" to HTTPS, the
opposite is not.
Right now, this website is hosted on a service (sourcehut pages) that doesn't
offer the option of not using SSL, but eventually, it's possible that this
website ends up being served by a machine running Dusk OS. In that case, it
will not be served under SSL and all https:// links will be broken.