WebAssembly is an actively used bytecode format created in 2015. WebAssembly (Wasm, WA) is a web standard that defines a binary format and a corresponding assembly-like text format for executable code in Web pages. It is meant to enable executing code nearly as fast as running native machine code. It was envisioned to complement JavaScript to speed up performance-critical parts of web applications and later on to enable web development in languages other than JavaScript. Read more on Wikipedia...

4Years Old 1,726Users 5Jobs

Example code from the web:

20 00
50
04 7E
42 01
05
20 00
20 00
42 01
7D
10 00
7E
0B

Example code from Linguist:

(module
  (import "env" "printInt" (func $printInt (param i32)))
  (func $add (param $lhs i32) (param $rhs i32) (result i32)
    get_local $lhs
    get_local $rhs
    i32.add
  )

  (func $main
    (call $printInt
      (call $add (i32.const 9) (i32.const 8))))

  (export "main" (func $main))
)

Example code from Wikipedia:

(module
  (import "math" "exp" (func $exp (param f64) (result f64)))
  (func (export "doubleExp") (param $0 f64) (result f64)
    (f64.mul
      (call $exp
        (get_local $0))
      (f64.const 2))))

Trending Repos

repo stars description
assemblyscript 6742 Definitely not a TypeScript to WebAssembly compiler 🚀

Last updated October 14th, 2019