@@ -9,9 +9,10 @@ post-MVP features doc](EssentialPostMVPFeatures.md).
9
9
This document explains the contents of the MVP at a high-level. There are also
10
10
separate docs with more precise descriptions of:
11
11
12
- * the [ polyfill to JavaScript] ( Polyfill.md )
13
- * the [ AST semantics] ( AstSemantics.md )
14
- * the [ binary encoding] ( BinaryEncoding.md )
12
+ * [ Polyfill to JavaScript] ( Polyfill.md ) ;
13
+ * [ AST semantics] ( AstSemantics.md ) ;
14
+ * [ Binary encoding] ( BinaryEncoding.md ) ;
15
+ * Implementation [ in the browser] ( Web.md ) and [ outside the browser] ( NonWeb.md ) .
15
16
16
17
** Note** : This content is still in flux and open for discussion.
17
18
@@ -36,6 +37,12 @@ separate docs with more precise descriptions of:
36
37
importing, though.
37
38
* When compiling from C++, imports would be generated for unresolved ` extern `
38
39
functions and calls to those ` extern ` functions would call the import.
40
+ * Host environments can define builtin modules that are implemented natively but
41
+ can otherwise be imported like [ other modules] ( MVP.md#Modules ) . As examples:
42
+ * A WebAssembly shell might define a builtin ` stdio ` library with an export
43
+ ` puts ` .
44
+ * In the browser, the WebIDL support mentioned in
45
+ [ future features] ( FutureFeatures.md ) .
39
46
* ** TODO** : there is more to discuss here concerning APIs.
40
47
41
48
## Module structure
@@ -44,10 +51,10 @@ separate docs with more precise descriptions of:
44
51
their type and byte-length.
45
52
* Sections with unknown types would be skipped without error.
46
53
* Standardized section types:
47
- * module import section (see [ Module imports ] ( MVP.md#module-imports ) below) ;
54
+ * module import section;
48
55
* globals section (constants, signatures, variables);
49
- * code section (see [ Code section ] ( MVP.md#code-section ) below) ;
50
- * heap initialization section (see [ Heap ] ( MVP.md#heap ) below) .
56
+ * code section;
57
+ * heap initialization section.
51
58
52
59
## Code section
53
60
@@ -93,38 +100,6 @@ isomorphic to the [binary format](BinaryEncoding.md).
93
100
* See the [ AST Semantics heap section] ( AstSemantics.md#accessing-the-heap ) for
94
101
more details.
95
102
96
- ## Non-browser embedding
97
-
98
- * Host environments can define builtin modules that are implemented natively but
99
- can otherwise be imported like
100
- [ other modules] ( MVP.md#code-loading-and-imports ) . As examples:
101
- * A WebAssembly shell might define a builtin ` stdio ` library with an export
102
- ` puts ` .
103
- * In the browser, the WebIDL support mentioned in
104
- [ future features] ( FutureFeatures.md ) .
105
- * Where there is overlap between the browser and popular non-browser
106
- environments, a shared spec could be proposed, but this would be separate
107
- from the WebAssembly spec.
108
- * A symmetric example in JavaScript would be the
109
- [ Loader] ( http://whatwg.github.io/loader ) spec, intended to be implemented by
110
- both browsers and node.js.
111
- * However, one might find a fair amount of variance between the browser and
112
- other environments on core APIs like network and file I/O.
113
- * To allow writing portable POSIX-like code (that ran in both browser and other
114
- environments), the WebAssembly community would develop a shared repository of
115
- WebAssembly code that mapped between a POSIX-like interface and the host's
116
- builtin modules using compile-time ` #ifdef ` s or, after
117
- [ dynamic linking] ( FutureFeatures.md#dynamic-linking ) was added, client-side
118
- dynamic feature testing.
119
- * A symmetric example in JavaScript would be the
120
- [ ES6 Module Loader polyfill] ( https://github.com/ModuleLoader/es6-module-loader )
121
- library.
122
- * The WebAssembly spec would thus not try to define any large portable
123
- libc-like library.
124
- * However, certain features that are core to WebAssembly semantics that are
125
- found in native libc * would* be part of the core WebAssembly spec as either
126
- primitive opcodes or a special builtin module (e.g., ` sbrk ` , ` mmap ` ).
127
-
128
103
## Security
129
104
130
105
WebAssembly MVP will be no looser from a security point-of-view than if the
0 commit comments