Geliştirme
Projenin kaynak kodu GitHub üzerindedir.
Gereksinimler
Başlamadan önce şunları kurun:
- Rust toolchain: rustup kurun.
rust-toolchain.tomlderleyiciyi, clippy'yi, rustfmt'yi vewasm32-unknown-unknownhedefini sabitler. rustup bunları ilk build'de kurar. - Trunk: Kurulum talimatları web sitesinde bulunur.
Geliştirme ortamı
# 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, /api/ altındaki istekleri localhost:46492 üzerindeki sunucuya gönderir.
Testler ve kontroller
make testsunucunun ve API tiplerinin testlerini çalıştırır. CIcargo nextest run --all-features --no-fail-fastkomutunu çalıştırır.make lintclippy'yi-D warningsile çalıştırır.make fmt-checkbiçimlendirmeyi kontrol eder.- CI ayrıca her fonksiyonun cyclomatic complexity değerinin 10 veya altında kaldığını
lizard -l rust -C 10 -w r3v3rs3/src r3v3rs3-api/src r3v3rs3-webui/srcile kontrol eder. make test-runtime-docker,make test-acme-pebblevemake test-discovery-e2eyok sayılan testleri Docker Engine, Pebble, Consul ve etcd üzerinde çalıştırır.make checkbiçim kontrolünü, clippy'yi, testleri ve WebUI build'ini çalıştırır.
Release build
make release
# Start the server
target/release/r3v3rs3 start
make release önce WebUI'ı r3v3rs3/dist/webui dizinine, sonra sunucuyu build eder. Sunucu bu dizini derleme sırasında içine gömer. Bu yüzden WebUI önce build edilir.