-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transpileToJS feature #46
base: master
Are you sure you want to change the base?
Conversation
I also create Chrome extensions with Rust, have you seen this section of the README? https://github.com/wasm-tool/rollup-plugin-rust?tab=readme-ov-file#chrome--firefox-extensions |
I made a few changes. I think I'm done with this pr. Thanks for your time! |
Sorry for the delay on this, I've been quite busy, but I plan to look at this soon. |
Let me give you a friendly reminder @Pauan 😅 |
@BaderBC Thanks for the reminder! So I checked, and this plugin works completely fine with Chrome extensions (including manifest 3). I created a simple example, which you can build with Then you just load the You do need to specify https://developer.chrome.com/docs/extensions/reference/manifest/content-security-policy The policy you mentioned before is only for remote code (such as loaded with HTTP), it doesn't apply to files which are bundled with the extension. So it's completely fine to use Wasm with Chrome extensions. |
Adds option to transpile wasm to JS using
wasm2js
tool.This feature would be great for old browser support as well as e.g. writing chrome extensions (which is why I am doing this pr), because chrome doesn't allow usage of wasm in their extensions.