Skip to content

limingth/arceos

Repository files navigation

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
  • Synchronization/Mutex
  • File system
  • Compatible with Linux apps
  • 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
yield axalloc, axtask alloc, paging, multitask, sched_fifo Multi-threaded yielding test
parallel axalloc, axtask alloc, paging, multitask, sched_fifo Parallel computing test (to test synchronization & mutex)
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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 58.1%
  • C 38.8%
  • Makefile 1.5%
  • Other 1.6%