book/src/development
~erin 98369c00bd
Better model messages
2023-04-20 18:39:00 -04:00
..
design Better model messages 2023-04-20 18:39:00 -04:00
README.md Performance notes 2023-04-20 14:38:24 -04:00
environment.md Fix sccache instructions 2023-04-17 18:42:17 -04:00
workflow.md More CI details 2023-04-17 17:52:17 -04:00

README.md

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:

  1. Resources will be licensed under the CNPLv7+ license
  2. You must follow the Code of Conduct
  3. 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 a microkernel!
  • 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:

  1. Read through the Rust Book
  2. Work through the Interactive Rust Book
  3. Complete the rustlings exercises
  4. Take a quick look through the Embedded Rust Book
  5. Read the RISC-V Guide/RISC-V Bytes to learn more about the RISC-V architecture
  6. Read the OSDev Wiki entries on Microkernels and Message Passing
  7. Read the Async Book
  8. 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:

  1. Go through the Vulkan Tutorial (Rust) to learn some of the basics
  2. Read through the Vulkano docs. (Vulkano is a safe wrapper around the Vulkan API. It's likely what we will be using)