# WebAssembly in WebExtensions?

**URL:** <https://discourse.mozilla.org/t/webassembly-in-webextensions/37238>\
**Category:** Development\
**Created:** [March 21, 2019, 10:53am UTC](https://discourse.mozilla.org/t/webassembly-in-webextensions/37238 "2019-03-21T10:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![platy](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/platy/32/26510_2.png) [@platy](https://discourse.mozilla.org/u/platy)\
**Post date:** [March 21, 2019, 10:53am UTC](https://discourse.mozilla.org/t/webassembly-in-webextensions/37238/1 "2019-03-21T10:53:33Z")

</div>

Are there any guidelines or considerations for using WebAssembly in WebExtensions? I’m also talking about having them published on AMO.

- Is all the WebExtension functionality available in each of the extension contexts?
- Is there anything to consider to help review apart from including the source and repeatable build instructions?

---

<div class="post-metadata">

**Author:** ![freaktechnik](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/freaktechnik/32/37766_2.png) [@freaktechnik](https://discourse.mozilla.org/u/freaktechnik)\
**Post date:** [March 21, 2019, 11:45am UTC](https://discourse.mozilla.org/t/webassembly-in-webextensions/37238/2 "2019-03-21T11:45:47Z")

</div>

> [@platy](#):
>
> Is all the WebExtension functionality available in each of the extension contexts?

If you mean a webassembly context, no because there is no API exposed directly to webassembly (like you currently can’t directly access the DOM).

> [@platy](#):
>
> Is there anything to consider to help review apart from including the source and repeatable build instructions?

uBlock origin seems to have web assembly parts ([uBlock/src/js/wasm at master · gorhill/uBlock · GitHub](https://github.com/gorhill/uBlock/tree/master/src/js/wasm)) which is mostly documented in the ways you’re describing. I don’t think there have been any updates regarding expectations toward web assembly sources specifically (see [Source code submission | Firefox Extension Workshop](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Source_Code_Submission) )

---

<div class="post-metadata">

**Author:** ![platy](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/platy/32/26510_2.png) [@platy](https://discourse.mozilla.org/u/platy)\
**Post date:** [March 21, 2019, 12:10pm UTC](https://discourse.mozilla.org/t/webassembly-in-webextensions/37238/3 "2019-03-21T12:10:15Z")

</div>

Great - I’ve got no reason not to give it a try then - Thanks!
