| Crates.io | web-concurrency-tester-rs |
| lib.rs | web-concurrency-tester-rs |
| version | 0.1.0 |
| created_at | 2026-01-02 02:26:41.705007+00 |
| updated_at | 2026-01-02 02:26:41.705007+00 |
| description | A deterministic concurrency testing tool for Web/JavaScript environments using DPOR and PCT. |
| homepage | |
| repository | https://github.com/nkwork9999/web-concurrency-tester-rs |
| max_upload_size | |
| id | 2017832 |
| size | 196,850 |
web-concurrency-tester-rs is a deterministic concurrency testing tool for Web/JavaScript environments, written entirely in Rust.
It helps developers find hard-to-reproduce race conditions in DOM operations by using advanced scheduling algorithms like Shuttle-style scheduling, DPOR (Dynamic Partial Order Reduction), and PCT (Probabilistic Concurrency Testing).
boa_engine and oxc_parser for direct analysis and execution in Rust.You can install the tool directly from crates.io:
cargo install web-concurrency-tester-rs
Create an HTML file (e.g., test.html) containing the JavaScript logic you want to verify.
<button onclick="inc()">Increment</button>
<script>
let count = 0;
// A function with a potential race condition
async function inc() {
let temp = count;
// Context switch point
await new Promise((r) => setTimeout(r, 10));
count = temp + 1;
}
</script>
If you installed via cargo:
web-concurrency-tester-rs test.html
Or if you are running from the source code:
cargo run --release -- test.html
The tool explores multiple execution schedules and reports any detected races:
DETECTED RACES:
[Write-Write] 'count': Task 0 vs Task 1
...
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0). See the LICENSE file for details.