GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing webassembly.github.io — WebAssembly Web API 1. IntroductionThis document builds off of the WebAssembly specification [WEBASSEMBLY] and the WebAssembly JavaScript embedding [WASMJS]. It describes the integration of WebAssembly into the broader Web platform, for example with additional APIs that are implemented by Web user agents but are outside the scope of JavaScript [ECMASCRIPT] itself.2. Streaming Module Compilation and Instantiation[
The
compileStreaming(source, options) method, when invoked, returns the result of compiling a potential WebAssembly response with source using options.
The
instantiateStreaming(source, importObject, options) method, when invoked, performs the following steps:
To compile a potential WebAssembly response with a promise of a
Response source and WebAssemblyCompileOptions options, perform the following steps:
Note: This algorithm accepts a
3. SerializationWeb user agents must augment the The serialization steps, given value, serialized, and forStorage, are:
The deserialization steps, given serialized, value, and targetRealm are:
Engines should attempt to share/reuse internal compiled code when performing a structured serialization, although in corner cases like CPU upgrade or browser update, this might not be possible and full recompilation may be necessary. Note: The semantics of a structured serialization is as-if the binary source, from which the
4. Developer-Facing Display ConventionsThis section is non-normative. Browsers, JavaScript engines, and offline tools have common ways of referring to JavaScript artifacts and language constructs. For example, locations in JavaScript source code are printed in stack traces or error messages, and are represented naturally as decimal-format lines and columns in text files. Names of functions and variables are taken directly from the sources. Therefore (for example) even though the exact format of implementation-dependent stack trace strings does not always match, the locations are easily understandable and the same across browsers. To achieve the same goal of a common representation for WebAssembly constructs, the following conventions are adopted. A WebAssembly location is a reference to a particular instruction in the binary, and may be displayed by a browser or engine in similar contexts as JavaScript source locations. It has the following format:
Where
Notes:
While the "name" property of an Exported Function instance is specified by the JS API, synthesized function names are also displayed in other contexts like call stacks in debuggers and string representations of stack traces. If a WebAssembly module contains a name section, these names should be used to synthesize a function name as follows:
Note that this document does not specify the full format of strings such as stack frame representations; this allows engines to continue using their existing formats for JavaScript (which existing code may already be depending on) while still printing WebAssembly frames in a format consistent with JavaScript. 5. Media-type RegistrationThe media type application/wasm
6. Security and Privacy ConsiderationsThis section is non-normative. WebAssembly provides no access to the surrounding environment other than via the JavaScript API described in the JS API specification. Therefore, WebAssembly cannot collect or expose any information (personal, sensitive or otherwise) to Web sites or other parties beyond what can be collected, exposed or processed with JavaScript. WebAssembly memory has the same lifetime as the objects in the surrounding JavaScript environment and is not persisted or serialized (other than by copying it out to JavaScript and using existing serialization APIs). No access is provided to the underlying platform or hardware, or to other devices, or to the user agent’s native UI.WebAssembly is an additional program execution mechanism, and can be executed wherever JavaScript can be executed. Therefore the threat model is essentially the same as for JavaScript code, and has similar considerations for delivery (e.g. WebAssembly code should be protected in transit from active and passive network attackers) and policy (e.g. some loading mechanisms or execution are restricted via mechanisms such as the same-origin policy or Content Security Policy). 7. Change HistoryThis section is non-normative. Since the original release 1.0 of the WebAssembly specification, a number of proposals for extensions have been integrated. The following sections provide an overview of what has changed. 7.1. Release 2.0Media-type Registraton CompletedThe registration for theapplication/wasm media type has been successfully completed.
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |