@ruby/head-wasm-wasi 2.7.1-2025-02-27-a → 2.7.1-2025-03-02-a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.script.iife.js +10 -10
- package/dist/browser.script.umd.js +8 -8
- package/dist/browser.umd.js +7 -7
- package/dist/index.umd.js +3 -3
- package/dist/ruby+stdlib.wasm +0 -0
- package/dist/ruby.debug+stdlib.wasm +0 -0
- package/dist/ruby.wasm +0 -0
- package/package.json +2 -2
|
@@ -1316,7 +1316,7 @@ SOFTWARE.
|
|
|
1316
1316
|
if (m) return m.call(o);
|
|
1317
1317
|
if (o && typeof o.length === "number") return {
|
|
1318
1318
|
next: function () {
|
|
1319
|
-
if (o && i >= o.length) o =
|
|
1319
|
+
if (o && i >= o.length) o = void 0;
|
|
1320
1320
|
return { value: o && o[i++], done: !o };
|
|
1321
1321
|
}
|
|
1322
1322
|
};
|
|
@@ -2051,7 +2051,7 @@ SOFTWARE.
|
|
|
2051
2051
|
wasi_snapshot_preview1: wasip1.wasiImport,
|
|
2052
2052
|
};
|
|
2053
2053
|
vm.addToImports(imports);
|
|
2054
|
-
(_a = options.addToImports) === null || _a ===
|
|
2054
|
+
(_a = options.addToImports) === null || _a === void 0 ? void 0 : _a.call(options, imports);
|
|
2055
2055
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
2056
2056
|
try {
|
|
2057
2057
|
await vm.setInstance(instance);
|
|
@@ -2060,7 +2060,7 @@ SOFTWARE.
|
|
|
2060
2060
|
console.error("Failed to instantiate Ruby VM. Please make sure that you have added `gem \"js\"` to your Gemfile.");
|
|
2061
2061
|
throw e;
|
|
2062
2062
|
}
|
|
2063
|
-
(_b = options.setMemory) === null || _b ===
|
|
2063
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
2064
2064
|
wasip1.initialize(instance);
|
|
2065
2065
|
vm.initialize(options.args);
|
|
2066
2066
|
return { vm, instance };
|
|
@@ -2179,7 +2179,7 @@ SOFTWARE.
|
|
|
2179
2179
|
}
|
|
2180
2180
|
return exports;
|
|
2181
2181
|
};
|
|
2182
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
2182
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
2183
2183
|
this.transport = new JsValueTransport();
|
|
2184
2184
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
2185
2185
|
}
|
|
@@ -2848,7 +2848,7 @@ SOFTWARE.
|
|
|
2848
2848
|
const DefaultRubyVM = async (rubyModule, options = {}) => {
|
|
2849
2849
|
var _a, _b;
|
|
2850
2850
|
const args = [];
|
|
2851
|
-
const env = Object.entries((_a = options.env) !== null && _a !==
|
|
2851
|
+
const env = Object.entries((_a = options.env) !== null && _a !== void 0 ? _a : {}).map(([k, v]) => `${k}=${v}`);
|
|
2852
2852
|
const fds = [
|
|
2853
2853
|
new OpenFile(new File([])),
|
|
2854
2854
|
new OpenFile(new File([])),
|
|
@@ -2856,14 +2856,14 @@ SOFTWARE.
|
|
|
2856
2856
|
new PreopenDirectory("/", new Map()),
|
|
2857
2857
|
];
|
|
2858
2858
|
const wasi = new WASI(args, env, fds, { debug: false });
|
|
2859
|
-
const printer = ((_b = options.consolePrint) !== null && _b !==
|
|
2859
|
+
const printer = ((_b = options.consolePrint) !== null && _b !== void 0 ? _b : true) ? consolePrinter() : undefined;
|
|
2860
2860
|
const { vm, instance } = await RubyVM.instantiateModule({
|
|
2861
2861
|
module: rubyModule, wasip1: wasi,
|
|
2862
2862
|
addToImports: (imports) => {
|
|
2863
|
-
printer === null || printer ===
|
|
2863
|
+
printer === null || printer === void 0 ? void 0 : printer.addToImports(imports);
|
|
2864
2864
|
},
|
|
2865
2865
|
setMemory: (memory) => {
|
|
2866
|
-
printer === null || printer ===
|
|
2866
|
+
printer === null || printer === void 0 ? void 0 : printer.setMemory(memory);
|
|
2867
2867
|
}
|
|
2868
2868
|
});
|
|
2869
2869
|
return {
|
|
@@ -2965,7 +2965,7 @@ SOFTWARE.
|
|
|
2965
2965
|
};
|
|
2966
2966
|
|
|
2967
2967
|
var name = "@ruby/head-wasm-wasi";
|
|
2968
|
-
var version = "2.7.1-2025-02-
|
|
2968
|
+
var version = "2.7.1-2025-03-02-a";
|
|
2969
2969
|
var description = "Ruby head built on WASI";
|
|
2970
2970
|
var main = "./dist/cjs/index.js";
|
|
2971
2971
|
var module = "./dist/esm/index.js";
|
|
@@ -3015,7 +3015,7 @@ SOFTWARE.
|
|
|
3015
3015
|
];
|
|
3016
3016
|
var license = "MIT";
|
|
3017
3017
|
var dependencies = {
|
|
3018
|
-
"@ruby/wasm-wasi": "2.7.1-2025-02-
|
|
3018
|
+
"@ruby/wasm-wasi": "2.7.1-2025-03-02-a"
|
|
3019
3019
|
};
|
|
3020
3020
|
var _package = {
|
|
3021
3021
|
name: name,
|
|
@@ -29,7 +29,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/browser.script.umd');\`
|
|
|
29
29
|
if (m) return m.call(o);
|
|
30
30
|
if (o && typeof o.length === "number") return {
|
|
31
31
|
next: function () {
|
|
32
|
-
if (o && i >= o.length) o =
|
|
32
|
+
if (o && i >= o.length) o = void 0;
|
|
33
33
|
return { value: o && o[i++], done: !o };
|
|
34
34
|
}
|
|
35
35
|
};
|
|
@@ -774,7 +774,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/browser.script.umd');\`
|
|
|
774
774
|
wasi_snapshot_preview1: wasip1.wasiImport,
|
|
775
775
|
};
|
|
776
776
|
vm.addToImports(imports);
|
|
777
|
-
(_a = options.addToImports) === null || _a ===
|
|
777
|
+
(_a = options.addToImports) === null || _a === void 0 ? void 0 : _a.call(options, imports);
|
|
778
778
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
779
779
|
try {
|
|
780
780
|
await vm.setInstance(instance);
|
|
@@ -783,7 +783,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/browser.script.umd');\`
|
|
|
783
783
|
console.error("Failed to instantiate Ruby VM. Please make sure that you have added `gem \"js\"` to your Gemfile.");
|
|
784
784
|
throw e;
|
|
785
785
|
}
|
|
786
|
-
(_b = options.setMemory) === null || _b ===
|
|
786
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
787
787
|
wasip1.initialize(instance);
|
|
788
788
|
vm.initialize(options.args);
|
|
789
789
|
return { vm, instance };
|
|
@@ -902,7 +902,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/browser.script.umd');\`
|
|
|
902
902
|
}
|
|
903
903
|
return exports;
|
|
904
904
|
};
|
|
905
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
905
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
906
906
|
this.transport = new JsValueTransport();
|
|
907
907
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
908
908
|
}
|
|
@@ -1571,7 +1571,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/browser.script.umd');\`
|
|
|
1571
1571
|
const DefaultRubyVM = async (rubyModule, options = {}) => {
|
|
1572
1572
|
var _a, _b;
|
|
1573
1573
|
const args = [];
|
|
1574
|
-
const env = Object.entries((_a = options.env) !== null && _a !==
|
|
1574
|
+
const env = Object.entries((_a = options.env) !== null && _a !== void 0 ? _a : {}).map(([k, v]) => `${k}=${v}`);
|
|
1575
1575
|
const fds = [
|
|
1576
1576
|
new OpenFile(new File([])),
|
|
1577
1577
|
new OpenFile(new File([])),
|
|
@@ -1579,14 +1579,14 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/browser.script.umd');\`
|
|
|
1579
1579
|
new PreopenDirectory("/", new Map()),
|
|
1580
1580
|
];
|
|
1581
1581
|
const wasi = new WASI(args, env, fds, { debug: false });
|
|
1582
|
-
const printer = ((_b = options.consolePrint) !== null && _b !==
|
|
1582
|
+
const printer = ((_b = options.consolePrint) !== null && _b !== void 0 ? _b : true) ? consolePrinter() : undefined;
|
|
1583
1583
|
const { vm, instance } = await RubyVM.instantiateModule({
|
|
1584
1584
|
module: rubyModule, wasip1: wasi,
|
|
1585
1585
|
addToImports: (imports) => {
|
|
1586
|
-
printer === null || printer ===
|
|
1586
|
+
printer === null || printer === void 0 ? void 0 : printer.addToImports(imports);
|
|
1587
1587
|
},
|
|
1588
1588
|
setMemory: (memory) => {
|
|
1589
|
-
printer === null || printer ===
|
|
1589
|
+
printer === null || printer === void 0 ? void 0 : printer.setMemory(memory);
|
|
1590
1590
|
}
|
|
1591
1591
|
});
|
|
1592
1592
|
return {
|
package/dist/browser.umd.js
CHANGED
|
@@ -729,7 +729,7 @@
|
|
|
729
729
|
wasi_snapshot_preview1: wasip1.wasiImport,
|
|
730
730
|
};
|
|
731
731
|
vm.addToImports(imports);
|
|
732
|
-
(_a = options.addToImports) === null || _a ===
|
|
732
|
+
(_a = options.addToImports) === null || _a === void 0 ? void 0 : _a.call(options, imports);
|
|
733
733
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
734
734
|
try {
|
|
735
735
|
await vm.setInstance(instance);
|
|
@@ -738,7 +738,7 @@
|
|
|
738
738
|
console.error("Failed to instantiate Ruby VM. Please make sure that you have added `gem \"js\"` to your Gemfile.");
|
|
739
739
|
throw e;
|
|
740
740
|
}
|
|
741
|
-
(_b = options.setMemory) === null || _b ===
|
|
741
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
742
742
|
wasip1.initialize(instance);
|
|
743
743
|
vm.initialize(options.args);
|
|
744
744
|
return { vm, instance };
|
|
@@ -857,7 +857,7 @@
|
|
|
857
857
|
}
|
|
858
858
|
return exports;
|
|
859
859
|
};
|
|
860
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
860
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
861
861
|
this.transport = new JsValueTransport();
|
|
862
862
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
863
863
|
}
|
|
@@ -1526,7 +1526,7 @@
|
|
|
1526
1526
|
const DefaultRubyVM = async (rubyModule, options = {}) => {
|
|
1527
1527
|
var _a, _b;
|
|
1528
1528
|
const args = [];
|
|
1529
|
-
const env = Object.entries((_a = options.env) !== null && _a !==
|
|
1529
|
+
const env = Object.entries((_a = options.env) !== null && _a !== void 0 ? _a : {}).map(([k, v]) => `${k}=${v}`);
|
|
1530
1530
|
const fds = [
|
|
1531
1531
|
new OpenFile(new File([])),
|
|
1532
1532
|
new OpenFile(new File([])),
|
|
@@ -1534,14 +1534,14 @@
|
|
|
1534
1534
|
new PreopenDirectory("/", new Map()),
|
|
1535
1535
|
];
|
|
1536
1536
|
const wasi = new WASI(args, env, fds, { debug: false });
|
|
1537
|
-
const printer = ((_b = options.consolePrint) !== null && _b !==
|
|
1537
|
+
const printer = ((_b = options.consolePrint) !== null && _b !== void 0 ? _b : true) ? consolePrinter() : undefined;
|
|
1538
1538
|
const { vm, instance } = await RubyVM.instantiateModule({
|
|
1539
1539
|
module: rubyModule, wasip1: wasi,
|
|
1540
1540
|
addToImports: (imports) => {
|
|
1541
|
-
printer === null || printer ===
|
|
1541
|
+
printer === null || printer === void 0 ? void 0 : printer.addToImports(imports);
|
|
1542
1542
|
},
|
|
1543
1543
|
setMemory: (memory) => {
|
|
1544
|
-
printer === null || printer ===
|
|
1544
|
+
printer === null || printer === void 0 ? void 0 : printer.setMemory(memory);
|
|
1545
1545
|
}
|
|
1546
1546
|
});
|
|
1547
1547
|
return {
|
package/dist/index.umd.js
CHANGED
|
@@ -722,7 +722,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/index.umd');\` with \`re
|
|
|
722
722
|
wasi_snapshot_preview1: wasip1.wasiImport,
|
|
723
723
|
};
|
|
724
724
|
vm.addToImports(imports);
|
|
725
|
-
(_a = options.addToImports) === null || _a ===
|
|
725
|
+
(_a = options.addToImports) === null || _a === void 0 ? void 0 : _a.call(options, imports);
|
|
726
726
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
727
727
|
try {
|
|
728
728
|
await vm.setInstance(instance);
|
|
@@ -731,7 +731,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/index.umd');\` with \`re
|
|
|
731
731
|
console.error("Failed to instantiate Ruby VM. Please make sure that you have added `gem \"js\"` to your Gemfile.");
|
|
732
732
|
throw e;
|
|
733
733
|
}
|
|
734
|
-
(_b = options.setMemory) === null || _b ===
|
|
734
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
735
735
|
wasip1.initialize(instance);
|
|
736
736
|
vm.initialize(options.args);
|
|
737
737
|
return { vm, instance };
|
|
@@ -850,7 +850,7 @@ Please replace your \`require('ruby-head-wasm-wasi/dist/index.umd');\` with \`re
|
|
|
850
850
|
}
|
|
851
851
|
return exports;
|
|
852
852
|
};
|
|
853
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
853
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
854
854
|
this.transport = new JsValueTransport();
|
|
855
855
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
856
856
|
}
|
package/dist/ruby+stdlib.wasm
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/ruby.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruby/head-wasm-wasi",
|
|
3
|
-
"version": "2.7.1-2025-02-
|
|
3
|
+
"version": "2.7.1-2025-03-02-a",
|
|
4
4
|
"description": "Ruby head built on WASI",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
],
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@ruby/wasm-wasi": "2.7.1-2025-02-
|
|
53
|
+
"@ruby/wasm-wasi": "2.7.1-2025-03-02-a"
|
|
54
54
|
}
|
|
55
55
|
}
|