diff options
| author | Dan Gohman <sunfish@mozilla.com> | 2017-04-04 16:27:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-04 16:27:18 -0700 |
| commit | ef8db8fb41f20759b57d8a5a0c6ca44319c453fe (patch) | |
| tree | 477974e048bf03a75065f3d5f356b98cfd1d9b81 /Web.md | |
| parent | 55f72332514d98a68868d13d4f59aae55a12d3f1 (diff) | |
| download | nanowasm-design-ef8db8fb41f20759b57d8a5a0c6ca44319c453fe.tar.gz | |
Clarify import/export identifier validation on the Web. (#1028)
Diffstat (limited to 'Web.md')
| -rw-r--r-- | Web.md | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -130,14 +130,11 @@ the ES6 module system](Modules.md#integration-with-es6-modules). ### Names -A WebAssembly module imports and exports functions. WebAssembly names functions -using arbitrary-length byte sequences. Any 8-bit values are permitted in a -WebAssembly name, including the null byte and byte sequences that don't -correspond to any Unicode code point regardless of encoding. The most natural -Web representation of a mapping of function names to functions is a JS object -in which each function is a property. Property names in JS are UTF-16 encoded -strings. A WebAssembly module may fail validation on the Web if it imports or -exports functions whose names do not transcode cleanly to UTF-16 according to +A WebAssembly module can have imports and exports, which are identified using +UTF-8 byte sequences. The most natural Web representation of a mapping of export +names to exports is a JS object in which each export is a property with a name +encoded in UTF-16. A WebAssembly module fails validation on the Web if it has +imports or exports whose names do not transcode cleanly to UTF-16 according to the following conversion algorithm, assuming that the WebAssembly name is in a `Uint8Array` called `array`: |
