Skip to content

Commit 7306b7f

Browse files
vouillonhhugo
authored andcommitted
Use a non-empty module name for imported string constants
1 parent d26067f commit 7306b7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/lib-wasm/gc_target.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ module Constant = struct
987987
in
988988
let* x =
989989
register_import
990-
~import_module:""
990+
~import_module:"str"
991991
~name:s
992992
(Global { mut = false; typ = Ref { nullable = false; typ = Extern } })
993993
in

runtime/wasm/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
"wasm:js-string": string_ops,
573573
"wasm:text-decoder": string_ops,
574574
"wasm:text-encoder": string_ops,
575-
"": new globalThis.Proxy(
575+
str: new globalThis.Proxy(
576576
{},
577577
{
578578
get(_, prop) {
@@ -586,7 +586,7 @@
586586
);
587587
const options = {
588588
builtins: ["js-string", "text-decoder", "text-encoder"],
589-
importedStringConstants: "",
589+
importedStringConstants: "str",
590590
};
591591

592592
function loadRelative(src) {

0 commit comments

Comments
 (0)