WangZhi723 / arceos

An experimental modular OS written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArceOS

CI

An experimental modular operating system (or unikernel) written in Rust.

ArceOS was inspired a lot by Unikraft.

🚧 Working In Progress.

Features & TODOs

  • Architecture: riscv64, aarch64
  • Platform: QEMU virt riscv64/aarch64
  • Multi-thread
  • Cooperative FIFO scheduler
  • VirtIO net/blk drivers
  • TCP net stack using smoltcp
  • File system
  • Compatible with Linux apps
  • Synchronization/Mutex
  • Interrupt driven device I/O
  • Async I/O
  • Kernel preemption
  • SMP

Example apps

Example applications can be found in the apps/ directory. All applications must at least depend on the following modules, while other modules are optional:

  • axruntime: Bootstraping from the bare-metal environment, and initialization.
  • axhal: Hardware abstraction layer, provides unified APIs for cross-platform.
  • axconfig: Platform constants and kernel parameters, such as physical memory base, kernel load addresses, stack size, etc.
  • axlog: Multi-level log definition and printing.
  • axerror: Error code definition.

The currently supported applications (Rust), as well as their dependent modules and features, are shown in the following table:

App Extra modules Enabled features Description
helloworld A minimal app that just prints a string
exception paging Exception handling test
memtest axalloc alloc, paging Dynamic memory allocation test
multitask axalloc, axtask alloc, paging, multitask, sched_fifo Multi-threading test
httpclient axalloc, axdriver, axnet alloc, paging, net A simple client that sends an HTTP request and then prints the response
echoserver axalloc, axdriver, axnet, axtask alloc, paging, net, multitask A multi-threaded TCP server that reverses messages sent by the client
httpserver axalloc, axdriver, axnet, axtask alloc, paging, net, multitask A multi-threaded HTTP server that serves a static web page

Build & Run

Rust apps

make ARCH=<arch> APP=<app> LOG=<log> NET=[on|off] FS=[on|off] run

Where <arch> should be one of riscv64, aarch64.

<log> should be one of off, error, warn, info, debug, trace.

<app> should be one of the application names. (as shown in the apps/ directory)

C apps

make ARCH=<arch> APP=<app> LOG=<log> NET=[on|off] FS=[on|off] APP_LANG=c run

Design

About

An experimental modular OS written in Rust.

License:Apache License 2.0


Languages

Language:Rust 90.5%Language:C 5.2%Language:Makefile 2.2%Language:Assembly 2.1%