News (last updated Sep 25). fork/exec, x86_64 stability, faster ext2 reads, and a delegate IPC path that survives a soak!
Mancini API Reference
What It Means
mazarin can fork a process and exec a new program in the child – via a
kernel-emulated vfork and a private clone_exec syscall – on top of
a real process model in the linux shepherd: monotonic PIDs, wait4,
pipe2, dup3, child-exit notification, and O_CLOEXEC honored end
to end. On amd64, the family of crashes that came from the Go runtime
keeping the goroutine pointer in two places (R14 and TLS) is fixed, along with two more x86-only
exception bugs. A long memory-corruption hunt closed with three
unrelated fixes and a clean soak. Most of the last two months went into
the kernel’s syscall-delegation path, which is now correct under
stress: stale replies are rejected by a per-claim generation witness,
and a publish-then-save race is closed. Reading 64 KB out of ext2 costs
3 device round trips instead of 49. Less happily, the page-table
accessed/dirty sweep turned out to cost about seventy points of CPU on
an idle machine and is switched off by default until we understand the
tick cost – see the news page.
Quick Start: build and run mazarin
mazarin, what this is
mazarin is a go-centric and indeed go-only operating system. (mazarin is not capitalized.) In the future mazarin may support languages like Javascript or Python for which interpreters written in go are available. Similarly, programs in Webassembly format may be supported for some compiled languages as there are Webassembly virtual machines written in go. Support for languages other than go is possible, but not a priority.
mazarin, what this is not
mazarin is not unix. mazarin does not argue that everything should be a file–it argues that everything is part of the UI. mazarin is not byte streams which work by read/write/open/close and file descriptors. If that is what you want, I suggest you try Linux; it is quite good. mazarin may offer some compatibility with Linux in an effort to accelerate support for features that are important to mazarin, but the compatibilty is not the goal.
mazarin, what this is
mazarin’s model is that everything is part of the UI. The UI is not only the most important thing in mazarin, but it is nearly the only thing. The UI of mazarin does not offer the programming model of any existing window system.
No C
mazarin does no use C code at all–nor cgo. go or go assembly is used in the build and boot processes. All the tools for building mazarin are written in go. The boot process uses bootloaders written in go for x8664 and arm64. If you want to get _pedantic, you could argue that the code before the bootloaders–such as firmware on x86_64 and DTB construction on arm64– is written in C, but this is far from mazarin’s concern.
I come to bury C, not to praise it. I harbor no ill-will towards C code, it can be highly useful and, with a strong linter, fairly clean and straightforward. I have partly built Mazarin to show you dont need C anymore. The world has changed a great deal since C’s debut in the 1970s.
mazarin, what this is
mazarin runs on bare metal and has a go-centric programming model. It is not just that the code is written go, it is that it does not offer the c/unix programming model. Most of programming model is focused on channels and goroutines. mazarin runs on paravirtualized hardware via a hypervisor but a middle-term goal is to run on a Raspberry Pi W zero version 2.
mazarin, what this is not
mazarin is not optimized. Linux has been being optimized for the last 25 years and that continues today. Linux’s performance is truly astonishing–but performance is not currently an area of focus for mazarin.
mazarin, what this is and what this is not
mazarin was written by AI. I have written precisely zero lines of code in this repository. I have written some of the documentation, such as this file, because what it communicates is too important to allow an AI to write it. (This may be human pride at work.) You may have concerns that the AI may have put code with intended or unintended security flaws in mazarin. You are wise to have have such concerns. I would recommend that you only run this code under a hypervisor that you have confidence in.
Honey, look! I vibecoded an operating system!