The Node Replicated Kernel is an (experimental) research OS kernel for x86-64 (amd64) machines written in rust. You can read more about it here.
git clone <repo-url> nrk
cd nrk
- Note: In case you don't have the SSH key of your machine registered with a github account,
you need to convert the submodule URLs to the https protocol, to do so run:
sed -i'' -e 's/git@github.com:/https:\/\/github.com\//' .gitmodules
git submodule update --init
Run bash setup.sh
, this will install required dependencies on Linux to build and run nrk.
cd kernel
python3 ./run.py
If you just want to compile the code you can also execute run.py
with the
--norun
flag.
To run the unit tests of the kernel:
cd kernel
RUST_BACKTRACE=1 RUST_TEST_THREADS=1 cargo test --bin nrk
To run the integration tests of the kernel:
cd kernel
RUST_TEST_THREADS=1 cargo test --features smoke --test integration-test
If you would like to run a specific integration test you can pass it with --
:
RUST_TEST_THREADS=1 cargo test --test integration-test -- --nocapture userspace_smoke
Note: Parallel testing is not possible at the moment due to reliance on build flags for testing.
Update latest master:
git checkout master
git pull
git submodule update --init
Create a new feature branch:
git checkout -b <BRANCH-NAME>
- Make changes in code.
Make sure that the code compiles without warnings, is properly formatted and passes tests:
cd kernel
bash commitable.sh
Commit changes and push
git add <CHANGED-FILES>
git commit
git push -u origin <BRANCH-NAME>
- Create a Pull Request on GitHub.