Storing WASM Modules in Fission's webnative file storage

web-assembly-logo

Our guide now has a walk through on how to store WASM modules in Fission’s webnative file storage.

Thank you to @bgins for putting this together!

We should probably take a short detour and give some background on Web Assembly:

Web Assembly

Web Assembly, or wasm for short, is the fourth language language to run natively in browsers, next to JavaScript, CSS, and HTML. It became an official W3C Recommendation as of December 2019, although major browser vendors agreed on a basic standard as of late 2017.

Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications.

via https://webassembly.org

What this means is that you can program in a number of different programming languages that will then compile down to wasm. Yes, you can write C or Rust code, and then have that run in the browser. The webassembly.org developer’s guide has starting points for a number of different languages.

An introduction to storing WASM modules in web native storage

The guide has the full walk through with code explanations. It uses the C programming language to make a very simple addition function that is compiled to Web Assembly so it can run in the browser.

You don’t need to know C to try this out :slight_smile:

This gives you a small taste of how to work with WASM modules, and also uses “vanilla” javascript, without a framework, using just the webnative module. You’ll see how Fission authentication works, and then store and retrieve files in a user’s storage.

Fission and Web Assembly

We plan to do more work with Web Assembly and make it a first class component of running apps on Fission. We will likely use Rust as the language we build Fission Web Assembly components in. With powerful edge devices, running computation in the browser makes a lot of sense, especially when paired with Fission’s authentication + storage for users and apps, like an open source iCloud.

Resources

2 Likes