sabjorn / BandcampEnhancementSuite

A Chrome Extension providing extra functionality for Bandcamp
MIT License
40 stars 3 forks source link

webassembly #153

Open sabjorn opened 1 year ago

sabjorn commented 1 year ago

as more audio analysis is desired, finding a way to use webassembly in the project is ideal. As a proof of concept, the Waveform calculations should be turned into webassembly (Rust) and then added to the project--replacing the old JS implementation.

Here are some links to help sort it out: https://web.dev/loading-wasm/ https://github.com/dteare/wasm-csp/blob/master/wasm-eval/background.js or possibly the number one answer in this SO post: https://stackoverflow.com/questions/70420273/how-can-i-make-webpack-embed-my-wasm-for-use-in-a-web-worker

also this may be needed for Manifest V3: https://developer.chrome.com/docs/extensions/mv3/manifest/web_accessible_resources/

https://stackoverflow.com/questions/57598482/how-do-i-use-wasm-in-the-content-script-of-a-firefox-web-extension https://github.com/gorhill/uBlock/tree/master/src/lib/lz4