Web-based PPM (P3 format) image viewer using Rust and WebAssembly. Client-side processing for fast, privacy-preserving image rendering.
Traditional JavaScript struggles with image parsing performance. WebAssembly provides near-native speed for compute-intensive operations while keeping all processing client-side.
- Rust - Systems language that compiles the parsing logic into WebAssembly
- WebAssembly (WASM) - Binary format that runs at near-native speed in browsers
- wasm-bindgen - Bridge between Rust code and JavaScript
- HTML5 Canvas - Web API for drawing the image pixels on screen
- Parse and render PPM P3 format images
- Comment filtering in headers
- Dimension and pixel validation
- Client-side processing (no uploads)
- Build the WASM package:
wasm-pack build --target web
- Start a local server:
python serve.py
- Open
http://localhost:8000/static/and upload a PPM file