Code Monkey home page Code Monkey logo

pluto's Introduction

Pluto

Build Status

Pluto is a kernel written almost entirely in Zig and supports x86, with aarch64 and x64 backends being planned.

Hello image

Goals

  • Should be written in Zig as much as possible. Assembly should only be used where required for functionality or performance reasons.
  • Light and performant. The kernel should be usable both on embedded and desktop class CPUs, made possible by it being lightweight and modular.
  • Basic utilities will be written in Zig. This includes a basic text editor and shell, and will be part of the filesystem external to the kernel itself.
  • Easy to port. The kernel is oblivious to the underlying architecture, meaning that ports only need to implement the defined interface and they should work without a hitch.

All of these goals will benefit from the features of Zig.

Build

Requires a master build of Zig (downloaded or built from source) xorriso and the grub tools (such as grub-mkrescue). A qemu-system binary compatible with your chosen target is required to run the kernel (e.g. qemu-system-i386).

zig build

Run

zig build run

or if you want to wait for a gdb connection:

zig build debug-run

Debug

Launch a gdb instance and connect to qemu.

zig build debug

Test

Run the unit tests or runtime tests.

zig build test

Options

  • -Drt-test=: Boolean (default false).
    • build: Build with runtime testing enabled. Makes the kernel bigger and slower but tests important functionality.
    • test: Run the runtime testing script instead of the unittests. Checks for the expected log statements and fails if any are missing.
  • -D[build-mode]=: Boolean (default false).
    • build: Build a certain build mode (release-safe, release-fast, release-small). Don't set in order to use the debug build mode.
    • test: Test a certain build mode (release-safe, release-fast, release-small). Don't set in order to use the debug build mode.

Contribution

We welcome all contributions, be it bug reports, feature suggestions or pull requests. We follow the style mandated by zig fmt so make sure you've run zig fmt on your code before submitting it.

We also like to order a file's members (public after non-public):

  1. imports
  2. type definitions
  3. constants
  4. variables
  5. inline functions
  6. functions
  7. entry point/init function

More styling information is available on the wiki

pluto's People

Contributors

samtebbs33 avatar drdeano avatar andrewrk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.