Find a file
2016-09-01 15:31:39 -06:00
alloc/hole_list_allocator Improve efficiency of kernel console 2016-09-01 14:39:45 -06:00
arch More efficient iteration in graphics functions 2016-09-01 15:31:39 -06:00
bootloader Arm! 2016-08-25 17:03:01 -06:00
kernel Improve efficiency of kernel console 2016-09-01 14:39:45 -06:00
paper Add a rough draft of the sysscall interface. 2016-09-01 21:35:30 +02:00
res Add serial init and serial interrupts 2016-09-01 11:10:56 -06:00
rust@a23064af5e Back to x86_64, update rust 2016-08-27 19:47:08 -06:00
.gitignore WIP: IDT in rust 2016-08-13 18:58:31 -06:00
.gitmodules Add simple paging, use rust libcore and compile without sse 2016-08-15 11:30:14 -06:00
arm-unknown-none.json Arm! 2016-08-25 17:03:01 -06:00
bochs.x86_64 Bootable kernel skeleton 2016-08-13 18:21:46 -06:00
cakefile.rs Rename the src directory to kernel. 2016-08-14 18:42:32 +02:00
Cargo.toml Draw on VESA for console using ransid 2016-09-01 11:51:33 -06:00
LICENSE Add license 2016-08-13 16:28:33 -06:00
Makefile More efficient iteration in graphics functions 2016-09-01 15:31:39 -06:00
README.md fix a couple of readme typos 2016-08-28 16:37:40 -05:00
rustc.sh Add simple paging, use rust libcore and compile without sse 2016-08-15 11:30:14 -06:00
x86_64-unknown-none.json WIP: Thread control block and TSS in kernel 2016-08-19 17:38:37 -06:00
x86_64-unknown-redox.json Add syscall handler, still work in progress 2016-08-18 19:44:31 -06:00

kernel

A collaborative effort to rewrite the kernel with focus on correctness and code quality.

Why?

The kernel code was getting increasingly messy to the point where only the original writer would be able to find and fix bugs. Fortunately, the kernel of Redox is relatively small and such a project is estimated to take only a few months.

What?

The aims of the new kernel should be clear in their order:

  1. Correctness: Above anything else, the kernel should be correct. No hacks, despite how the tiny cool shortcuts might seem, it gives severe backslash later on. Keep it correct and well-written.

  2. Readability and documentation: The code quality should be high, with that follows a detailed documentation, including both API docs (on every item!) and careful comments for anything non-trivial.

  3. Performance: If you can, go for it.

Guidelines

A rotten house is built on a rotten fundament.

Don't fool yourself. You are likely not getting back to the ugly code. Write it the right way first time, and make sure you only move on when it's done right.

Comments

Do not hesitate to put comments all over the place.

Documentation

Every public item should contain API documentation.

Debug assertions

Abusing debug assertions is a wonderful way to catch bugs, and it is very much encouraged.

Statical checking

Rust provides a lot of type-system features which can be used to create wonderful safe abstractions, and you should use them whenever you get the chance.

Unsafety should be avoided, and if it is triggered only under some addition insert an assertion. Despite this being a kernel, we prefer kernel panics over security vulnerabilities.

If the condition is (or should be) unreachable, but if not upheld, leading to UB, put an assertion in the start of the function.

Be gentle

Don't just write as much code as you can as quick as possible. Take your time and be careful.

Commits

Use descriptive commits. One way to force yourself to do that is to not pass the -m flag, which will make your editor pop up, so that you can conviniently write long commit messages.