Rebuilding an old browser image library with Rust + WebAssembly
I originally started this project as a small practice project for two things:
- publishing a library
- learning Rust + WebAssembly in a real workflow
I paused it for a while, and recently came back to improve it properly: img-toolkit.
It’s a browser image processing library with a Rust/WASM core and a JS/TS wrapper.
- resize
- format convert (
jpg/png/webp) - brightness adjustment
GitHub: https://github.com/2YH02/img-toolkit
Demo: https://2yh02.github.io/img-toolkit
npm: https://www.npmjs.com/package/img-toolkit
Why I restarted it
I wanted to turn it from a simple practice repo into something cleaner and actually usable.
Recent improvements
- API cleanup with clearer function boundaries:
processImageresizeconvertFormatadjustBrightness
- Better WebP behavior across runtime environments
- Cleaner user-facing error behavior
- Documentation and release process improvements
Quick comparison (same source image)
- Original: 747 KB
- JS canvas output: 49.3 KB
- Rust/WASM output: 41.3 KB
(Comparison images are in the README.)
It’s still a work in progress, but it’s now much more usable than before.
If you try it, I’d really appreciate feedback on API design and real-world use cases.
Top comments (0)