Giter Site home page Giter Site logo

wasm-experiments's Introduction

WebAssembly Experimental Code

This repository contains some short guides and small snippets of WebAssembly (WASM) and code interacting with WASM.

The repository started out as a various examples, gists and guides that I have made either for students or for understanding a specific aspect of WASM or how to use some tool.

If you find anything confusing, misleading, out of date, or plain wrong. Please open an issue or make a PR.

The code and guides are currently focused on writing WASM by hand in the textual format, aka WAT.

Tools and resources

The following list is incomplete. I mostly use the following tools:

  • The official WebAssembly webpage

  • The reference interpreter is a fantastic Swiss Army knife for working with WASM. It understands both the textual and binary format of WASM and can translate between formats, it has an interactive interpreter, and a scripting language (WAST) that can be used for testing WASM modules.

  • WABT is a suite of standalone cli tools for WASM. Easy to install on most platforms.

  • Binaryen both a suite of cli tools, and a compiler and toolchain infrastructure library.

Converting between the textual format and the binary format

The reference interpreter can translate WAT to WASM:

$ wasm fact.wat -o fact.wasm

or from WASM to WAT ( be careful you don't overwrite your files ), which can be useful if you want to inspect some WASM created by an other tool or compiler:

$ wasm fact.wasm -o fact.wat

Or you can use wat2wasm and wasm2wat from WABT:

$ wat2wasm fact.wat
$ wasm2wat fact.wasm

The guides

The repository currently contains the following guides:

Files referred to in the guides are in the code directory, plus a few more examples that I haven't gotten around writing guides for yet.

wasm-experiments's People

Contributors

kfl avatar

Watchers

 avatar  avatar  avatar

Forkers

isabellaedwards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.