It is an open-source operating system project written in the Zig programming language.
BamOS does not introduce new standards but strives for the best possible implementation of existing ones.
The main feature and goal of this project is to develop a lightweight and fast operating system with a well-documented, concise, and simple codebase, as much as possible.
It aims to include native support for multiple system ABIs between the kernel and user space (GNU/Linux, Windows NT, etc.) simultaneously. This should significantly improve the user experience and simplify the work for software developers.
Despite the familiar and established languages like C/C++ or the possibly safer Rust, our choice is Zig.
Zig is simple enough to be more maintainable than Rust while offering a safer and more functional alternative to C/C++. Zig allows generating high-speed and optimized machine code, and one of its main advantages is the build system, which makes the compilation process seamless and incredibly simple.
To create a bootable image, all you need is the source code, the Zig compiler, and the command zig build
.
BamOS is still a small but growing project.
We welcome any contributions and invite you to participate in the development and evolution of the project.
See information on contributing.
Before you begin, ensure that the Zig compiler version 0.14.1 is installed on your workstation.
The build process is quite straightforward:
git clone https://github.com/bagggage/bamos.git
cd bamos
zig build --release=[off|small|safe|fast]
This will build the kernel bamos.elf
and create a bootable image bamos.iso
. By default, the build result will be located in the zig-out
directory.
To specify a different path, use the --prefix=[path]
option during the build.
zig build kernel
: build kernel executablezig build iso
: create bootable imagezig build qemu
: run image in QEMUzig build docs
: generate kernel documentation (destination:/docs
)
Use zig build -h
to learn more.
For quick OS testing and launch, it is recommended to use the QEMU emulator.
On Windows, you should also add the qemu
directory in the PATH
environment variable beforehand.
zig build qemu --release=safe
You can configure virtual machine by passing different options -Dqemu-*
,
use zig build -h
to learn more.
The general OS documentation is available on this page.
The code documentation is available on this page. If you want to generate the documentation locally, run the following command:
zig build docs
A static site will be placed in the /docs
directory, which can then be launched using:
cd docs
python -m http.server
The Zig language description and documentation for its standard library can be found on the official website.
BamOS is at an early stage of development, and many things are not yet implemented. Moreover, writing the implementation and developing the operating system architecture requires an iterative approach to find the best solutions, so some details may change, but this is all for the better.
To track what has already been implemented in the project and what stage it is currently at, check out this page.