@ruby/3.2-wasm-wasi 2.7.1-2025-02-04-a → 2.7.1
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,10 +2051,10 @@ 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
|
await vm.setInstance(instance);
|
|
2057
|
-
(_b = options.setMemory) === null || _b ===
|
|
2057
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
2058
2058
|
wasip1.initialize(instance);
|
|
2059
2059
|
vm.initialize(options.args);
|
|
2060
2060
|
return { vm, instance };
|
|
@@ -2173,7 +2173,7 @@ SOFTWARE.
|
|
|
2173
2173
|
}
|
|
2174
2174
|
return exports;
|
|
2175
2175
|
};
|
|
2176
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
2176
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
2177
2177
|
this.transport = new JsValueTransport();
|
|
2178
2178
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
2179
2179
|
}
|
|
@@ -2842,7 +2842,7 @@ SOFTWARE.
|
|
|
2842
2842
|
const DefaultRubyVM = async (rubyModule, options = {}) => {
|
|
2843
2843
|
var _a, _b;
|
|
2844
2844
|
const args = [];
|
|
2845
|
-
const env = Object.entries((_a = options.env) !== null && _a !==
|
|
2845
|
+
const env = Object.entries((_a = options.env) !== null && _a !== void 0 ? _a : {}).map(([k, v]) => `${k}=${v}`);
|
|
2846
2846
|
const fds = [
|
|
2847
2847
|
new OpenFile(new File([])),
|
|
2848
2848
|
new OpenFile(new File([])),
|
|
@@ -2850,14 +2850,14 @@ SOFTWARE.
|
|
|
2850
2850
|
new PreopenDirectory("/", new Map()),
|
|
2851
2851
|
];
|
|
2852
2852
|
const wasi = new WASI(args, env, fds, { debug: false });
|
|
2853
|
-
const printer = ((_b = options.consolePrint) !== null && _b !==
|
|
2853
|
+
const printer = ((_b = options.consolePrint) !== null && _b !== void 0 ? _b : true) ? consolePrinter() : undefined;
|
|
2854
2854
|
const { vm, instance } = await RubyVM.instantiateModule({
|
|
2855
2855
|
module: rubyModule, wasip1: wasi,
|
|
2856
2856
|
addToImports: (imports) => {
|
|
2857
|
-
printer === null || printer ===
|
|
2857
|
+
printer === null || printer === void 0 ? void 0 : printer.addToImports(imports);
|
|
2858
2858
|
},
|
|
2859
2859
|
setMemory: (memory) => {
|
|
2860
|
-
printer === null || printer ===
|
|
2860
|
+
printer === null || printer === void 0 ? void 0 : printer.setMemory(memory);
|
|
2861
2861
|
}
|
|
2862
2862
|
});
|
|
2863
2863
|
return {
|
|
@@ -2959,7 +2959,7 @@ SOFTWARE.
|
|
|
2959
2959
|
};
|
|
2960
2960
|
|
|
2961
2961
|
var name = "@ruby/3.2-wasm-wasi";
|
|
2962
|
-
var version = "2.7.1
|
|
2962
|
+
var version = "2.7.1";
|
|
2963
2963
|
var description = "Ruby 3.2 built on WASI";
|
|
2964
2964
|
var main = "./dist/cjs/index.js";
|
|
2965
2965
|
var module = "./dist/esm/index.js";
|
|
@@ -3009,7 +3009,7 @@ SOFTWARE.
|
|
|
3009
3009
|
];
|
|
3010
3010
|
var license = "MIT";
|
|
3011
3011
|
var dependencies = {
|
|
3012
|
-
"@ruby/wasm-wasi": "2.
|
|
3012
|
+
"@ruby/wasm-wasi": "^2.0.0"
|
|
3013
3013
|
};
|
|
3014
3014
|
var _package = {
|
|
3015
3015
|
name: name,
|
|
@@ -29,7 +29,7 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/browser.script.umd');\` w
|
|
|
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,10 +774,10 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/browser.script.umd');\` w
|
|
|
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
|
await vm.setInstance(instance);
|
|
780
|
-
(_b = options.setMemory) === null || _b ===
|
|
780
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
781
781
|
wasip1.initialize(instance);
|
|
782
782
|
vm.initialize(options.args);
|
|
783
783
|
return { vm, instance };
|
|
@@ -896,7 +896,7 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/browser.script.umd');\` w
|
|
|
896
896
|
}
|
|
897
897
|
return exports;
|
|
898
898
|
};
|
|
899
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
899
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
900
900
|
this.transport = new JsValueTransport();
|
|
901
901
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
902
902
|
}
|
|
@@ -1565,7 +1565,7 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/browser.script.umd');\` w
|
|
|
1565
1565
|
const DefaultRubyVM = async (rubyModule, options = {}) => {
|
|
1566
1566
|
var _a, _b;
|
|
1567
1567
|
const args = [];
|
|
1568
|
-
const env = Object.entries((_a = options.env) !== null && _a !==
|
|
1568
|
+
const env = Object.entries((_a = options.env) !== null && _a !== void 0 ? _a : {}).map(([k, v]) => `${k}=${v}`);
|
|
1569
1569
|
const fds = [
|
|
1570
1570
|
new OpenFile(new File([])),
|
|
1571
1571
|
new OpenFile(new File([])),
|
|
@@ -1573,14 +1573,14 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/browser.script.umd');\` w
|
|
|
1573
1573
|
new PreopenDirectory("/", new Map()),
|
|
1574
1574
|
];
|
|
1575
1575
|
const wasi = new WASI(args, env, fds, { debug: false });
|
|
1576
|
-
const printer = ((_b = options.consolePrint) !== null && _b !==
|
|
1576
|
+
const printer = ((_b = options.consolePrint) !== null && _b !== void 0 ? _b : true) ? consolePrinter() : undefined;
|
|
1577
1577
|
const { vm, instance } = await RubyVM.instantiateModule({
|
|
1578
1578
|
module: rubyModule, wasip1: wasi,
|
|
1579
1579
|
addToImports: (imports) => {
|
|
1580
|
-
printer === null || printer ===
|
|
1580
|
+
printer === null || printer === void 0 ? void 0 : printer.addToImports(imports);
|
|
1581
1581
|
},
|
|
1582
1582
|
setMemory: (memory) => {
|
|
1583
|
-
printer === null || printer ===
|
|
1583
|
+
printer === null || printer === void 0 ? void 0 : printer.setMemory(memory);
|
|
1584
1584
|
}
|
|
1585
1585
|
});
|
|
1586
1586
|
return {
|
package/dist/browser.umd.js
CHANGED
|
@@ -729,10 +729,10 @@
|
|
|
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
|
await vm.setInstance(instance);
|
|
735
|
-
(_b = options.setMemory) === null || _b ===
|
|
735
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
736
736
|
wasip1.initialize(instance);
|
|
737
737
|
vm.initialize(options.args);
|
|
738
738
|
return { vm, instance };
|
|
@@ -851,7 +851,7 @@
|
|
|
851
851
|
}
|
|
852
852
|
return exports;
|
|
853
853
|
};
|
|
854
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
854
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
855
855
|
this.transport = new JsValueTransport();
|
|
856
856
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
857
857
|
}
|
|
@@ -1520,7 +1520,7 @@
|
|
|
1520
1520
|
const DefaultRubyVM = async (rubyModule, options = {}) => {
|
|
1521
1521
|
var _a, _b;
|
|
1522
1522
|
const args = [];
|
|
1523
|
-
const env = Object.entries((_a = options.env) !== null && _a !==
|
|
1523
|
+
const env = Object.entries((_a = options.env) !== null && _a !== void 0 ? _a : {}).map(([k, v]) => `${k}=${v}`);
|
|
1524
1524
|
const fds = [
|
|
1525
1525
|
new OpenFile(new File([])),
|
|
1526
1526
|
new OpenFile(new File([])),
|
|
@@ -1528,14 +1528,14 @@
|
|
|
1528
1528
|
new PreopenDirectory("/", new Map()),
|
|
1529
1529
|
];
|
|
1530
1530
|
const wasi = new WASI(args, env, fds, { debug: false });
|
|
1531
|
-
const printer = ((_b = options.consolePrint) !== null && _b !==
|
|
1531
|
+
const printer = ((_b = options.consolePrint) !== null && _b !== void 0 ? _b : true) ? consolePrinter() : undefined;
|
|
1532
1532
|
const { vm, instance } = await RubyVM.instantiateModule({
|
|
1533
1533
|
module: rubyModule, wasip1: wasi,
|
|
1534
1534
|
addToImports: (imports) => {
|
|
1535
|
-
printer === null || printer ===
|
|
1535
|
+
printer === null || printer === void 0 ? void 0 : printer.addToImports(imports);
|
|
1536
1536
|
},
|
|
1537
1537
|
setMemory: (memory) => {
|
|
1538
|
-
printer === null || printer ===
|
|
1538
|
+
printer === null || printer === void 0 ? void 0 : printer.setMemory(memory);
|
|
1539
1539
|
}
|
|
1540
1540
|
});
|
|
1541
1541
|
return {
|
package/dist/index.umd.js
CHANGED
|
@@ -722,10 +722,10 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/index.umd');\` with \`req
|
|
|
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
|
await vm.setInstance(instance);
|
|
728
|
-
(_b = options.setMemory) === null || _b ===
|
|
728
|
+
(_b = options.setMemory) === null || _b === void 0 ? void 0 : _b.call(options, instance.exports.memory);
|
|
729
729
|
wasip1.initialize(instance);
|
|
730
730
|
vm.initialize(options.args);
|
|
731
731
|
return { vm, instance };
|
|
@@ -844,7 +844,7 @@ Please replace your \`require('ruby-3.2-wasm-wasi/dist/index.umd');\` with \`req
|
|
|
844
844
|
}
|
|
845
845
|
return exports;
|
|
846
846
|
};
|
|
847
|
-
this.guest = proxyExports(binding !== null && binding !==
|
|
847
|
+
this.guest = proxyExports(binding !== null && binding !== void 0 ? binding : new LegacyBinding());
|
|
848
848
|
this.transport = new JsValueTransport();
|
|
849
849
|
this.exceptionFormatter = new RbExceptionFormatter();
|
|
850
850
|
}
|
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/3.2-wasm-wasi",
|
|
3
|
-
"version": "2.7.1
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Ruby 3.2 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.
|
|
53
|
+
"@ruby/wasm-wasi": "^2.0.0"
|
|
54
54
|
}
|
|
55
55
|
}
|