Development
The source code of r3v3rs3 is on GitHub.
Prerequisites
Install these before you build:
- Rust toolchain: install rustup.
rust-toolchain.tomlpins the compiler, clippy, rustfmt and thewasm32-unknown-unknowntarget, and rustup installs them at the first build. - Trunk: Visit the website for installation instructions
Development Setup
# Clone the repository
git clone https://github.com/KilimcininKorOglu/r3v3rs3
cd r3v3rs3
# Create an admin account
cargo run --bin r3v3rs3 -- add-user admin
# Start the server
make run
# In a separate terminal, start `trunk serve` for the WebUI
cd r3v3rs3-webui
trunk serve
trunk serve sends the requests under /api/ to the server on localhost:46492.
Tests and Checks
make testruns the tests of the server and the API types. CI runscargo nextest run --all-features --no-fail-fast.make lintruns clippy with-D warnings, andmake fmt-checkchecks the formatting.- CI also checks that every function stays at or below a cyclomatic complexity of 10 with
lizard -l rust -C 10 -w r3v3rs3/src r3v3rs3-api/src r3v3rs3-webui/src. make test-runtime-docker,make test-acme-pebbleandmake test-discovery-e2erun the ignored tests against a Docker Engine, Pebble and etcd.make checkruns the format check, clippy, the tests and the WebUI build.
Building for Release
make release
# Start the server
target/release/r3v3rs3 start
make release builds the WebUI into r3v3rs3/dist/webui and then the server. The server embeds that directory at compile time, so the WebUI is built first.