$ show SerenityOS/serenity
SerenityOS is a graphical Unix-like operating system built from scratch, comprising a custom kernel (x86_64, AArch64, RISC-V), a POSIX-compatible C library, a GUI toolkit (LibGUI), a web browser engine (LibWeb), a JavaScript engine (LibJS), and hundreds of userland applications and services. The codebase demonstrates high engineering effort with consistent patterns (ErrorOr, reference counting, IPC frameworks, object macros) and extensive test coverage across kernel, libraries, and web standards. However, it bears some technical drift: many POSIX functions are stubs, kernel features are incomplete on newer architectures, and the ports system for third-party software requires ongoing maintenance. The repository is actively developed with frequent commits and issue triage.
The LLM identified 4 files worth highlighting for reuse:
The AK (Awesome Kernel) library provides foundational C++ utilities used across the entire OS: custom types (ErrorOr, Span, String, FlyString), algorithms, synchronization primitives, and memory management. It is self-contained, well-tested, and could be extracted as a standalone utility library for any C++ project.
A reusable color picker dialog with RGB/alpha spinboxes, HTML text input, preview widget, and palette/custom tabs. It uses the C_OBJECT macro and an on_color_changed callback, demonstrating a clean composition pattern for GUI dialogs in LibGUI. The component is self-contained and could serve as a model for building similar picker dialogs.
A concise test file for JavaScript's logical AND operator, covering boolean, string, number, object, null, and undefined cases. It uses a simple test() pattern with expect().toBe() assertions. This testing approach is reusable for validating any JavaScript operator semantics and is independent of the larger OS context.
RequestServer is a system service that handles HTTP/HTTPS requests using the IPC::MultiServer pattern. It demonstrates a clean separation of network protocol handling from the client application, with pledge/unveil for sandboxing and Core::EventLoop for async I/O. The service architecture is reusable for any network-facing userland service in a Unix-like OS.