Servo is the main point of connection and communication in YJSP's software systems, a central server which handles procedure storage, flight computer communication, logging, data forwarding, GUI-to-FC interaction, and more.
If not already installed on your system, install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Then, clone the repository. Remember, this requires authentication in the form of a personal access token or SSH key.
# Using personal access token
git clone https://github-research.gatech.edu/YJSP/servo.git
# Using SSH key
git clone git@github-research.gatech.edu:YJSP/servo.git
Finally, install Servo by using the path to the project directory (by default, the path will be ./servo
). This will allow you to use the servo
command globally.
cargo install --path ./servo
Welcome developers! For a quick rundown on developing for Servo, read below. For documentation of the API, check out API.md. If you have any other questions, contact the RE for this project, Jeff Shelton. For documentation on Servo's internal library (mainly for Servo developers), clone this project and run cargo doc --open
.
Although you may use whatever code editor you prefer, VSCode + the rust-analyzer plugin are excellent choices for Rust development. If you're new to Rust, the best reference to learn is the Rust Book, a free online book written by the Rust developers which is incredibly well-written and comprehensive, along with the typical StackOverflow.
Servo needs to be 100% operational whenever it's in use, so here are a couple simple guidelines to help keep our code as stable as possible:
.unwrap()
, .expect()
, panic!()
, or any other function/method/macro that could cause the program to panic. There are a few rare exceptions to this rule, such as when obtaining a mutex lock or when you can absolutely guarantee that code will not panic under any circumstance.#![warn(missing_docs)]
flag in src/lib.rs
. Since multiple people will be working on the same project, we need to thoroughly document everything so no one is confused.Of course, everyone makes mistakes, which is why all pull requests must be reviewed by another developer before they are merged. We don't have a massive team and all of us are learning, so don't be afraid to submit and review pull requests, no matter your level of skill.
Effective debugging is essential on this project because this software is absolutely mission-critical. Using tools like lldb and gdb is recommended, especially for memory issues such as leaks. Segfaults should be less of an issue now since we are using Rust, but if you use any unsafe code in a commit (such as interaction with hardware), please triple-check it for possible memory issues using one of these tools or another like them.
We also want to steadily introduce unit testing across YJSP software projects, including this one. If you are coding a non-trivial item of Servo, please write unit tests for that item. Debugging now means 10x less debugging later.