Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 2.21 KB

DEVELOPER.md

File metadata and controls

44 lines (25 loc) · 2.21 KB

Read Me > Developer

Developer Info

Note: there is a quick setup tutorial for Ubuntu 22.04 LTS

Main branch shall work fine for most of the time, but from time to time it may have some issues, as a result of ongoing development. Usually they are resolved as soon as possible. So you may think to base your changes on latest tag instead of main branch.

Minimum rust version is 1.66, as I'm testing on this specific version. However, if needed you may try to build rws on your own using older version with the --ignore-rust-version flag.

Depending on your setup you may need to run commands listed below as an administrator (open CMD as an administrator on Windows or use sudo on Linux and macOS).

I personally use IDEA Community Edition with Rust plugin, it is free and works quite well with code inspections.

However, I run and test from terminal.

Before proceeding, it is a good idea to update rust toolchain:

rustup update

Run

cargo run --ignore-rust-version

Test

cargo test --ignore-rust-version

To run specific test (replace client_hint::tests::client_hints_header with test you want to run)

cargo test --package rws --bin rws client_hint::tests::client_hints_header -- --exact --ignore-rust-version

Debug

In my setup IDEA Community Edition does not have support for debugging, even though it is stated otherwise on their website.

While running a test you may notice the fact that stdout does not show the println!. To workaround this problem I usually create a file named as the test I'm running and instead of using println! macros simply writing the output to the file.

It's not a fancy debugger, but you may print to a file all info debugger shows - variable, it's value and any additional information.

Tests may be executed in parallel so use unique file name for each test to eliminate concurrency issues.

Build

cargo build --ignore-rust-version

Release

Open RELEASE for details.