A tool for compare and contrast the performance of algorithms in Rust WASM and JS languages.
This project is part of a thesis presented for the degree of MSc In Software Solutions Architecture @ Technological University of Dublin (IT Tallaght)
The objective of the research is to compare and contrast the performance of multiple algorithms written in JavaScript and Rust WebAssembly versions in terms of Execution Time and Memory Consumption.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Following is the setup to run the benchmark tool.
You will need to run these steps with administrator privileges.
- nodeJS
- http-server installed globally:
npm install http-server -g
- Rust and its compiler tools at:
https://www.rust-lang.org/tools/install
- check whether rust is installed:
rustc --version
- You might want to play with rust before going into this project:
https://www.rust-lang.org/learn/get-started
These steps setup cargo and WASM tools. They are available at:
https://rustwasm.github.io/docs/book/game-of-life/setup.html
- Install wasm-pack for building, testing, and publishing Rust-generated WebAssembly:
https://rustwasm.github.io/wasm-pack/installer/
- Install cargo-generate with this command:
cargo install cargo-generate
- If you already have npm installed, make sure it is up to date with this command:
npm install npm@latest -g
- Inside
rustComparisons\www
folder execute:npm ci
- To build WASM package,
- From
rustComparisons
folder execute:
wasm-pack build; $env:rust_test_mode='1'; cargo test;
- To run the tool,
- From
rustComparisons\www
folder execute:
npm test; npm start
- Access the URL:
http://localhost:8080/
- To build WASM package,
- From
rustComparisons
folder execute:
wasm-pack build --profiling
- To build WWW package,
- From
rustComparisons\www
folder execute:
npm run build
- Then run site execute:
npm run static
- Access the URL:
http://localhost:8080/
- From
rustComparisons
folder execute:
wasm-pack build; $env:rust_test_mode='1'; cargo test;
- From
rustComparisons\www
folder execute:
npm test