https://github.com/maudnals/wasm-image-operations
Demo Web App with image operations with WebAssembly compiled from Rust, with benchmarks
https://github.com/maudnals/wasm-image-operations
parcel rust wasm webassembly
Last synced: about 2 months ago
JSON representation
Demo Web App with image operations with WebAssembly compiled from Rust, with benchmarks
- Host: GitHub
- URL: https://github.com/maudnals/wasm-image-operations
- Owner: maudnals
- Created: 2018-11-09T01:06:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T05:28:33.000Z (over 3 years ago)
- Last Synced: 2025-08-09T09:38:15.512Z (10 months ago)
- Topics: parcel, rust, wasm, webassembly
- Language: JavaScript
- Homepage:
- Size: 3.76 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wasm-image-operations
start-node.sh
JS vs Wasm benchmark, when perform the same basic operations on an image's pixels.
## Demo
* The average pixel value (R+G+B) of the image is computed with WebAssembly.
* A benchmark of JS vs Wasm duration to perform the operations is performed (over multiple iterations) - see below the image.
## Run
1. Install the dependencies:
\$ npm install
2. Start the demo:
\$(npm bin)/parcel index.html
parcel serve index.html --public-url /
3. Visit `http://localhost:1234` with your browser.
## Built with Parcel+Rust
Boilerplate used: https://github.com/koute/stdweb/tree/master/examples/hasher-parcel
## How does this work?
A [parcel plugin] is used to integrate `cargo-web` with Parcel.
[parcel plugin]: https://github.com/koute/parcel-plugin-cargo-web
Source: https://github.com/koute/stdweb/tree/master/examples/hasher-parcel