Contributing

Thanks for being interested in contributing to the Nova Engine project!

Trunk-based Development
Trunk-based development is a version control management practice where developers merge small, frequent updates to a core “trunk” or main branch. It’s a common practice among teams and part of the SRE lifecycle since it streamlines merging and integration phases. Trunk-based development is a required practice of true CI/CD.

Rather than relying on feature branches, Trunk Based Development has each developer work locally and independently on their project, and then merge their changes back into the main branch (the trunk) at least once a day. Merges must occur whether or not feature changes or additions are complete.

Research Environment
We use Zotero for collecting and analyzing research. You can find our current research library in the Pleiades Supercompute group. If you'd like to submit research to be applied to Pleiades, please let one of the project maintainers know and we'll start a discussion around it!

Development Environment
Tools you'll need:


 * Rust
 * repo from Google
 * multipass from Canonical
 * An Ubuntu One account
 * Editor or IDE, Visual Studio Code or Jetbrains Gateway are recommended
 * buf CLI

All of our development tools are based around Ubuntu with some compatibility for arm64 macOS. We also support Visual Studio Code and Jetbrains Gateway via client installation. Several of the bits of server code require Linux with the `PREEMPT_RT` patch for the runtime server due to the hard real-time requirements. To make it easier to develop, we use `multipass` from Canonical. You'll also need a free Ubuntu Pro subscription to get the `PREEMPT_RT` kernel.

Once you've installed `multipass`, it's recommended to create an alias of `mp` to make it easier to work with.

Setup
First, you'll need to install. You can find the current instructions on the Android website. is used to manage all of the core repositories. Once you've installed, setup the workspace.

"If you're on macOS, you might need to edit the shebang of to use python3"

mkdir nova-workspace && cd nova-workspace repo init -u https://review.gerrithub.io/shieldmaidens/manifest --config-name -b mainline repo sync

This will clone all of the repositories to your local workspace.

Setting up multipass (Under Construction)
Add your SSH public key to the cloud-init file found at `build/cloud-config.yaml`. Otherwise you won't be able to log into your VM.

mp launch -c 4 -m 16G -d 40G --cloud-init build/cloud-config.yaml -n primary mp transfer -r ~/.ssh primary:/home/ubuntu/ mp transfer -r ~/.git* primary:/home/ubuntu/ cd .. && mp transfer -r pleiades primary:/home/ubuntu/ && cd Pleiades/
 * 1) make sure you're in the root of the repo
 * 2) create the vm. this uses 4 cpu, 16gib of ram, and 40gb of disk space.
 * 3) adjust these values as needed
 * 1) copy your git stuff to make life easier
 * 1) copy the pleiades source

Once the VM has been provisioned, it will say something along the lines of `Launched: primary` and a few mounting notes. While you wait, log into your Ubuntu Pro account and grab your token. Once the machine has been provisioned, you can access it and finish the installation:

mp shell primary code --install-extension "GitHub.copilot" code --install-extension "minherz.copyright-inserter" code --install-extension "ms-vscode-remote.vscode-remote-extensionpack" code --install-extension "ms-vsliveshare.vsliveshare" code --install-extension "redhat.vscode-commons" code --install-extension "redhat.vscode-xml" code --install-extension "redhat.vscode-yaml" code --install-extension "remcohaszing.schemastore" code --install-extension "rust-lang.rust-analyzer" code --install-extension "timonwong.shellcheck" sudo pro attach sudo pro enable realtime-kernel sudo reboot now
 * 1) get into the vm
 * 1) (optional) install the recommended vscode extensions
 * 1) attach your pro subscription
 * 1) install the rt kernel
 * 1) reboot

Warning: Even if you have an Intel processor, do not install the `intel-iotg` variant of the RT kernel as Pleiades is currently built on ARM platforms.

At this point, the core VM is set up. Hooking it up to vscode is pretty simple at this point:


 * 1) Get the IP of the VM
 * 2) You can use `mp info primary --format json | jq -r '.info.primary.ipv4[0]'` to make it simpler
 * 3) Add a new SSH host to vscode
 * 4) Connect to the SSH host
 * 5) Select the `pleiades` folder from the `ubuntu` user's home directory.

At this point you are all set up!

Warning: ''The source code from your laptop will be copied to your VM, and then whatever changes you make there won't be mirrored back. Use `mp transfer` to bring all the source files back if you need them on your laptop.''

OpenPGP Keys
If you're like "good" devs and you use OpenPGP keys for git security, you'll also want to add those. Sienna uses Keybase to manage my keys just for ease of use. You'll want to add those to your devbox as well.

keybase pgp export > key.asc keybase pgp export -s > priv-key.asc mp transfer key.asc primary:/home/ubuntu mp transfer priv-key.asc primary:/home/ubuntu gpg --import key.asc gpg --import priv-key.asc
 * 1) export the keys
 * 1) transfer the keys to the devbox
 * 1) import the keys in the devbox

And now you're all setup!

Everything Else

 * Open an issue with a proposed change if it's larger than a bugfix
 * Be very careful about memory allocations
 * Use linear commits whenever possible
 * Fix-forward, no backports
 * Document your code
 * Ask questions if you get stuck!