Developing / Building the Radar
Prerequiresits
Valthrun requires the Rust toolchain to be compiled.
As Rust nightly features are used by Valthrun, you must first switch to Rust nightly.
Switching to the Rust nightly compiler can be done by the following command:
rustup default nightly
Setup development environment
This is only for the dev environment.
The Valthrun repository does contain all release files (e.g. the server, dedicated client and the HTML files).
In order to use the radar you have to do some steps:
-
Start the pub / sub server:
cd radar\server-standalone
cargo r -
Start the standalone radar client (cs2 needs to be open)
cd radar\client-standalone
cargo r -- -p ws://127.0.0.1:7229/publish -
Start the web page via webpack-dev-server
cd radar\web
$env:SERVER_URL="ws://127.0.0.1:7229/subscribe"
$env:NODE_ENV="development"
yarn start:dev
Build the radar
-
Build the pub / sub server
cargo build --release radar-server-standalone
The result will be located at
target/release/radar-server-standalone.exe
-
Build the radar client
cargo build --release radar-client-standalone
The result will be located at
target/release/radar-client-standalone.exe
-
Build the web scripts
cd radar\web
# Attention:
# Set the SERVER_URL to the URL the web client should connect to.
# You can use "ws://127.0.0.1:7229/subscribe" for a local http setup or
# "wss://radar.valth.run/subscribe" for the official server
$env:SERVER_URL="wss://example.com/subscribe"
$env:NODE_ENV="development"
yarn buildThe result will be located at
dist
inradar/web