Thanks for being interested in contributing to this project! This document describes what you need to know to get started with the code.
First, install the Rust
programming language by following the instructions at
rustup.rs.
Next, install libclang
, which is used by the
ovr_overlay
bindings for OpenVR. For windows,
use this link. For Linux, simply sudo apt-get install -y libclang-dev
.
You will also need SteamVR installed.
If you are building on the steam deck, be sure that you have all the necessary libraries for native development installed. To get them, follow these instructions.
cargo
is the build tool for rust. You can cargo run
to run the code, cargo check
to check if your code compiles, and cargo test
to run tests. You can also do
--release
to generate an optimized release mode version. This will take longer to
compile but will run significantly faster.
Documentation is autogenerated by cargo and can be viewed in a web browser with
cargo doc --all --open --no-deps --document-private-items
. You can run
cargo doc --help
to learn more about what those flags do. The documentation is also
automatically published to github pages for every commit on the main
branch here.
All code is autoformatted by cargo fmt
. We suggest turning on autoformatting on save
in your IDE, otherwise you can just run cargo fmt
on the command line. Also, all files
should end in a newline and have extra whitespace trimmed.
Its also a good idea to run cargo clippy
to fix the style lints it generates.