← 返回日报
预计 1 分钟

maestro: Lightweight, Linux-compatible kernel, written in Rust

摘要

这是一个用 Rust 编写的轻量级 Unix-like 内核(kernel),项目仍在早期开发阶段,功能不完整且高度不稳定,明确不建议用于生产环境。当前支持 x86 和 x86_64 架构,AArch64 为计划中。已实现约 30% 的 Linux system calls,并包含多种内核能力:驱动与设备支持(PS/2 键盘、NVMe、PCI 枚举、IDE/PATA)、内存管理(buddy allocator、类似 dlmalloc 的分配器、虚拟内存、Copy-on-Write)、调度与并发(可抢占调度器、SMP、CPU 拓扑)、文件系统(VFS、ext2、/proc、/tmp、initramfs)、进程与 UNIX 语义(进程、信号、pipe、socket、ELF 执行),以及基础硬件与系统组件(ACPI、PIT/RTC/APIC/HPET、VGA 终端等)。项目本身仅为内核,可通过 installer 或手动构建生成系统,并可在 QEMU 或 VirtualBox 等虚拟机中运行,文档以 book 形式提供构建与使用说明。

荐读理由

内容仅为早期开发中未支持 AArch64、未实现 70% 系统调用且明确警告不用于生产的主张,属于标题党与早期的 AI 工程炒作

原文

logo

AGPL-3.0 license Version Rust toolchain Continuous integration Stars Discord

About

Maestro is a lightweight Unix-like kernel written in Rust.

The goal is to provide a lightweight operating system able to use the safety features of the Rust language to be reliable.

This project is still in early stage development, thus it is highly unstable and misses a lot of features. Do not use it in production!

To stay updated with the project, follow the blog!

neofetch

Neofetch and bash running on the OS.

Features

CPU architectures support

Architecture Status
x86_64
x86
AArch64 📅
  • Supported
  • 📅 Planned (not currently supported)

The following features are currently implemented (non-exhaustive):

  • Linux's system calls (roughly 30% are currently implemented)

  • Kernel modules

  • Drivers

    • PS/2 keyboard (includes forward compatibility with USB keyboards)

    • IDE/PATA

    • NVMe

  • PCI devices enumeration

  • Basic ACPI support

  • Memory management

    • Buddy allocator

    • Internal memory allocator, with similarities with dlmalloc's implementation

    • Per-process virtual memory

    • Over committing

    • Copy-on-Write

    • Page cache

  • Unix processes

  • Unix files

    • Virtual FileSystem (VFS) with mountpoints

    • Filesystem (ext2 only)

    • Disk partitions (MBR and GPT)

    • Virtual filesystems (/tmp and /proc)

    • initramfs (cpio)

    • Unix pipes and sockets

    • Device files

  • ELF programs

  • Terminal

  • Clocks

Quickstart

This repository is not a full operating system in itself but only the kernel.

You can either:

  • Use the installer to build a full operating system from an ISO file

  • Build the OS by hand. For this, you can check the kernel's book

The OS can then be run by a virtual machine such a QEMU or VirtualBox, or on a physical machine.

Build

To build and/or run the OS, cd into the kernel's crate:

cd kernel/

Then follow the instructions in README.md

Documentation

The kernel's book contains general information on how to use the kernel.

mdbook and mdbook-mermaid are required:

cargo install mdbook mdbook-mermaid

Build the book with:

mdbook-mermaid install doc/
mdbook build doc/

Then, it can be accessed at doc/book/index.html.

Lobsters · 2 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?