Skip to content
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

Enable shipping WebAssembly source code alongside main Snap bundle #774

Open
rekmarks opened this issue Sep 16, 2022 · 0 comments
Open

Enable shipping WebAssembly source code alongside main Snap bundle #774

rekmarks opened this issue Sep 16, 2022 · 0 comments
Labels
area-developing Related to the process of developing snaps / snaps devX. area-publishing Related to developer publishing snaps for consumption. Includes manifest-related issues. type-enhancement New feature or request

Comments

@rekmarks
Copy link
Member

Snaps that use WebAssembly (WASM) currently have two options for loading their WASM source at runtime:

  1. Host it somewhere and fetch it at runtime (e.g. here)
  2. Turn the WASM source into a byte string, bundle that into the JavaScript source and convert it to a buffer at runtime

(1) requires network access - which makes it harder to trust the snap - while (2) is clunky and may make the JavaScript bundle impractically large. We need to provide a way for snaps to ship their .wasm files alongside the main JavaScript bundle and load them at runtime.

@rekmarks rekmarks added type-enhancement New feature or request area-publishing Related to developer publishing snaps for consumption. Includes manifest-related issues. area-developing Related to the process of developing snaps / snaps devX. labels Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-developing Related to the process of developing snaps / snaps devX. area-publishing Related to developer publishing snaps for consumption. Includes manifest-related issues. type-enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant