SUPPORT THE WORK

GetWiki

WebAssembly

ARTICLE SUBJECTS
aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
critical  →
discussion  →
forked  →
imported  →
original  →
WebAssembly
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{Use dmy dates|date=March 2016}}{{Short description|binary format for executables used by web pages}}







factoids
| latest release version = | latest release date = Type system>Static| scope = | implementations = | dialects = asm.jsGoogle Native Client>PNaCl}}| influenced = | programming language = Apache 2.0 License>Apache 2.0.wat|.wasm}}| file format = }}WebAssembly (often shortened to Wasm) is a standard that defines a binary format and a corresponding assembly-like text format for executables used by web pages.The purpose of Wasm is to enable the JavaScript engine of a web browser to execute page scripts nearly as fast as native machine code. But this is not a full replacement for JavaScript; rather, Wasm is only intended for performance-critical portions of page scripts. Wasm code runs in the same sandbox as regular script code, but only regular scripts have direct access to the DOM tree.The World Wide Web Consortium (W3C) maintains the standard with contributions from Mozilla, Microsoft, Google, and Apple.

History

WebAssembly was first announced in 2015, and the first demonstration was executing Unity's Angry Bots in Firefox, Google Chrome, and Microsoft Edge. The precursor technologies were asm.js from Mozilla and Google Native Client, and the initial implementation was based on the feature set of asm.js.In March 2017, the design of the minimum viable product was declared to be finished and the preview phase ended. {{As of|2017|September|alt=In late September 2017}}, Safari 11 was released with support. In February 2018, the WebAssembly Working Group published three public working drafts for the Core Specification, JavaScript Interface, and Web API.

Support

In November 2017, Mozilla declared support "in all major browsers", after WebAssembly was enabled by default in Edge 16. {{As of|2018|12}}, roughly 80% of installed browsers support WebAssembly.But for older browsers, Wasm can be compiled into asm.js by a JavaScript polyfill.Because WebAssembly executables are pre-compiled, it is possible to use a variety programming languages to make them. This is achieved either through direct compilation to Wasm, or through implementation of the corresponding virtual machines in Wasm. There have been around 40 programming languages reported to support Wasm as compilation target.Emscripten can compile to Wasm using LLVM in the backend.Its initial aim is to support compilation from C and C++, though support for other source languages such as Rust and .NET languages is also emerging.WEB,weblink Frequently asked questions (FAQ) about Blazor, blazor.net, 2018-06-18, After the minimum viable product (MVP) release, there are plans to support multithreading and garbage collection which would make WebAssembly a compilation target for garbage-collected programming languages like Java, C# (supported via Blazor) and Go.

Representation

WebAssembly code is intended to be run on a portable abstract structured stack machine, which is designed to be faster to parse than JavaScript, as well as faster to execute, and to enable very compact code representation.In March 2017, the WebAssembly Community Group reached consensus on the initial (MVP) binary format, JavaScript API, and reference interpreter. It defines a WebAssembly binary format, which is not designed to be used by humans, as well as a human-readable linear assembly bytecode format that resembles traditional assembly languages.The table below represents three different views of the same source code input from the left, as it is converted to a Wasm intermediate representation, then to Wasm binary:{| class="wikitable"! C input source !! Linear assembly bytecode (intermediate representation) !! Wasm binary encoding (hexadecimal bytes) style="vertical-align:top"|int factorial(int n) {
if (n == 0)
return 1;
else
return n * factorial(n-1);
}get_local 0i64.eqzif (result i64)
i64.const 1
else
get_local 0
get_local 0
i64.const 1
i64.sub
call 0
i64.mul
end20 005042 0120 0020 0042 017D10 007EThe WebAssembly text format can also be written in a folded format using s-expressions. This format is purely syntactic sugar and has no behavioral differences with the linear format. An example is shown below:(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)
)
)
)

Literature

  • JOURNAL, Andreas, Haas, Andreas, Rossberg, Derek L., Schuff, Ben L., Titzer, Dan, Gohman, Luke, Wagner, Alon, Zakai, JF, Bastien, Michael, Holman, June 2017, Bringing the web up to speed with WebAssembly,weblink Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, Association for Computing Machinery, 185–200,
  • JOURNAL, Watt, Conrad, 2018, Mechanising and Verifying the WebAssembly Specification,weblink ACM SIGPLAN International Conference on Certified Programs and Proofs, ACM, 7, 10.1145/3167082,

References

{{Free-content attribution||title= Text Format|author = jfbastien; rossberg-chromium; kripken; titzer; s3ththompson; sunfishcode; lukewagner; flagxor; enricobacis; c3d; binji; andrewosh|publisher = GitHub|source= WebAssembly/design|documentURL=weblink|license statement URL=weblink|license= Apache License 2.0}}

External links

{{Web browsers|fsp}}{{Web interfaces}}{{JavaScript}}

- content above as imported from Wikipedia
- "WebAssembly" does not exist on GetWiki (yet)
- time: 6:25am EST - Sat, Feb 16 2019
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
GETWIKI 19 AUG 2014
GETWIKI 18 AUG 2014
Wikinfo
Culture
CONNECT