From 7c7b4e1524fdc72f41f12e13ae3cc3a201e81c5f Mon Sep 17 00:00:00 2001 From: Artem Kobzar Date: Wed, 25 Oct 2023 18:39:36 +0200 Subject: [PATCH 1/3] Add information about varuint32 --- source-map.bs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source-map.bs b/source-map.bs index 07e348b..38736a8 100644 --- a/source-map.bs +++ b/source-map.bs @@ -63,6 +63,12 @@ spec:bikeshed-1; type:dfn; for:railroad; text:optional "publisher": "W3C", "status": "Living Standard", "title": "WebAssembly custom section" + }, + "varuint32": { + "href": "https://github.com/WebAssembly/design/blob/main/BinaryEncoding.md#varuintn", + "publisher": "WebAssembly GitHub", + "status": "design notes", + "title": "varuint32 binary encoding" } } @@ -362,7 +368,7 @@ also accept `//@` but `//#` is preferred. This recommendation works well for JavaScript, it is expected that other source files will have different conventions. For instance, for CSS `/*# sourceMappingURL= */` is proposed. -On the WebAssembly side, such URL should be placed as a UTF-8 encoded string in the custom section ([[WasmCustomSection]]) named `sourceMappingURL`. +On the WebAssembly side, such a URL is placed in the custom section ([[WasmCustomSection]]) named `sourceMappingURL` and represented as `url_name_len` + `url_name_str` where `url_name_len` is length [[varuint32]] of `url_name_str` and `url_name_str` is bytes of the UTF-8 encoded URL string. `` is a URL as defined in [[URL]]; in particular, characters outside the set permitted to appear in URIs must be percent-encoded From 650f84d137734b0713627533a754103569682c41 Mon Sep 17 00:00:00 2001 From: Artem Kobzar Date: Wed, 13 Dec 2023 11:27:18 +0100 Subject: [PATCH 2/3] Use reference on "WebAssembly Names binary format" instead of wasm GitHub notes --- source-map.bs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source-map.bs b/source-map.bs index 38736a8..3ac6bff 100644 --- a/source-map.bs +++ b/source-map.bs @@ -64,11 +64,11 @@ spec:bikeshed-1; type:dfn; for:railroad; text:optional "status": "Living Standard", "title": "WebAssembly custom section" }, - "varuint32": { - "href": "https://github.com/WebAssembly/design/blob/main/BinaryEncoding.md#varuintn", - "publisher": "WebAssembly GitHub", - "status": "design notes", - "title": "varuint32 binary encoding" + "WasmNamesBinaryFormat": { + "href": "https://www.w3.org/TR/wasm-core-2/binary/values.html#names", + "publisher": "W3C", + "status": "Living Standard", + "title": "WebAssembly Names binary format" } } @@ -368,7 +368,7 @@ also accept `//@` but `//#` is preferred. This recommendation works well for JavaScript, it is expected that other source files will have different conventions. For instance, for CSS `/*# sourceMappingURL= */` is proposed. -On the WebAssembly side, such a URL is placed in the custom section ([[WasmCustomSection]]) named `sourceMappingURL` and represented as `url_name_len` + `url_name_str` where `url_name_len` is length [[varuint32]] of `url_name_str` and `url_name_str` is bytes of the UTF-8 encoded URL string. +On the WebAssembly side, such a URL is encoded using [[WasmNamesBinaryFormat]], and it's placed in the custom section ([[WasmCustomSection]]) named `sourceMappingURL`. `` is a URL as defined in [[URL]]; in particular, characters outside the set permitted to appear in URIs must be percent-encoded From 973c1f17b4f7040d0413712f17d5a28374ea499b Mon Sep 17 00:00:00 2001 From: Artem Kobzar Date: Thu, 14 Dec 2023 12:01:41 +0100 Subject: [PATCH 3/3] Replace "placed in" with "placed as" to express that this is the totality of the custom section --- source-map.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-map.bs b/source-map.bs index 3ac6bff..6184c83 100644 --- a/source-map.bs +++ b/source-map.bs @@ -368,7 +368,7 @@ also accept `//@` but `//#` is preferred. This recommendation works well for JavaScript, it is expected that other source files will have different conventions. For instance, for CSS `/*# sourceMappingURL= */` is proposed. -On the WebAssembly side, such a URL is encoded using [[WasmNamesBinaryFormat]], and it's placed in the custom section ([[WasmCustomSection]]) named `sourceMappingURL`. +On the WebAssembly side, such a URL is encoded using [[WasmNamesBinaryFormat]], and it's placed as the content of the custom section ([[WasmCustomSection]]) named `sourceMappingURL`. `` is a URL as defined in [[URL]]; in particular, characters outside the set permitted to appear in URIs must be percent-encoded