Development
If you're wanting to help develop Mercury, you've come to the right place! Again, right now we're a heavy work-in-progress. But eventually this will be useful!
Contributor Agreements
By submitting resources to this project (code, art, writing, etc.), you must agree to the following terms:
- Resources will be licensed under the CNPLv7+ license
- You must follow the Code of Conduct
- You should follow the Design Goals and Best Practices when possible
Otherwise, feel free to start contributing!
Best Practices
These are various "best practices" for code written for the Mercury project. They should be followed when reasonable, to the best of your ability/understanding. Feel free to contact a maintainer with questions!
- No compromises will be made for compatibility. If there is a better, if unusual, way to do things, it should be done that way.
- Everything must be fully accessible. Everything else can be sacrificed for this.
unsafe
code should be avoided when possible.- Everything should be documented as it is written.
- Nesting should be avoided as much as possible.
- If something can be excluded from the main
kernel
, it should be. It's amicrokernel
! - Features should be opt-in rather than opt-out.
Source Code
All of the source code for Mercury is on a self-hosted Gitea, courtesy of Lavender Software. Sign up there, and contact one of the maintainers to get access to the repositories.
The source for this site, and our website is available there as well.
Design
All crates
/libraries
are in a no-std
environment. This means we only have access to the libcore functionality.
However, we will be using the alloc
crate to access the heap, andcollections
to have access to data structures like Vec
.
We should, however, have basic support for async and threading in core::
.
Learning
Before jumping in, I highly recommend learning some stuff abotu Rust and embedded development with it. A thorough series of steps might be:
- Read through the Rust Book
- Work through the Interactive Rust Book
- Complete the rustlings exercises
- Take a quick look through the Embedded Rust Book
- Read the RISC-V Guide/RISC-V Bytes to learn more about the RISC-V architecture
- Read the OSDev Wiki entries on Microkernels and Message Passing
- Read the Async Book
- This has some good information about performance
Additionally you might want to learn about Vulkan if you're going to be hacking on the GUI:
- Go through the Vulkan Tutorial (Rust) to learn some of the basics
- Read through the Vulkano docs. (Vulkano is a safe wrapper around the Vulkan API. It's likely what we will be using)