ruby_wasm 2.7.1 → 2.7.2
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.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +1 -1
- data/Cargo.lock +18 -3
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/docs/cheat_sheet.md +8 -8
- data/ext/ruby_wasm/Cargo.toml +1 -1
- data/lib/ruby_wasm/build/toolchain.rb +1 -1
- data/lib/ruby_wasm/cli.rb +1 -1
- data/lib/ruby_wasm/packager/component_adapter.rb +1 -3
- data/lib/ruby_wasm/version.rb +1 -1
- data/package-lock.json +2400 -1849
- data/package.json +4 -4
- data/rakelib/ci.rake +34 -0
- data/sig/ruby_wasm/cli.rbs +4 -0
- data/sig/ruby_wasm/packager.rbs +4 -0
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cff5f6f0bb40dae18d6bb5299a9aa21a72f5f6f1eebfa9983361398bb7db244
|
4
|
+
data.tar.gz: abc40251479c2a0e5b8d7d6b517ad2dde4c85144e0fdd164d9be0ceceada832d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9767e7f677a4010826be60996865c6f69dcd0c5c55536e7b3dc7800f23370231fac4f2a8b4e36968a685e50474745e61c1cb87e50c80152aec0908c4919e9eec
|
7
|
+
data.tar.gz: 37deb8d2326a2bad442500e109bb29a218afd730ce522e093a452d49339c913116afe0519ec992686ad058efbb0ccdfb065e5b5927886ff78be6758be320cb52
|
data/CONTRIBUTING.md
CHANGED
@@ -129,7 +129,7 @@ $ npm install --save @ruby/wasm-wasi@latest
|
|
129
129
|
# or if you want the nightly snapshot
|
130
130
|
$ npm install --save @ruby/wasm-wasi@next
|
131
131
|
# or you can specify the exact snapshot version
|
132
|
-
$ npm install --save @ruby/wasm-wasi@2.7.
|
132
|
+
$ npm install --save @ruby/wasm-wasi@2.7.2-2025-10-03-a
|
133
133
|
```
|
134
134
|
|
135
135
|
|
data/Cargo.lock
CHANGED
@@ -1361,7 +1361,7 @@ dependencies = [
|
|
1361
1361
|
"wasi-virt",
|
1362
1362
|
"wasm-compose 0.219.1",
|
1363
1363
|
"wit-component 0.216.0",
|
1364
|
-
"wizer",
|
1364
|
+
"wizer 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
1365
1365
|
]
|
1366
1366
|
|
1367
1367
|
[[package]]
|
@@ -1835,13 +1835,13 @@ dependencies = [
|
|
1835
1835
|
[[package]]
|
1836
1836
|
name = "wasi-vfs-cli"
|
1837
1837
|
version = "0.5.3"
|
1838
|
-
source = "git+https://github.com/kateinoigakukun/wasi-vfs/?tag=v0.5.3#
|
1838
|
+
source = "git+https://github.com/kateinoigakukun/wasi-vfs/?tag=v0.5.3-p1#32437aed43b117fe6905f547924196c15bf7b966"
|
1839
1839
|
dependencies = [
|
1840
1840
|
"anyhow",
|
1841
1841
|
"structopt",
|
1842
1842
|
"wasm-encoder 0.212.0",
|
1843
1843
|
"wasmparser 0.212.0",
|
1844
|
-
"wizer",
|
1844
|
+
"wizer 6.0.0 (git+https://github.com/kateinoigakukun/wizer.git?branch=katei/add-env-option-6.0.0)",
|
1845
1845
|
]
|
1846
1846
|
|
1847
1847
|
[[package]]
|
@@ -2750,6 +2750,21 @@ dependencies = [
|
|
2750
2750
|
"wasmtime",
|
2751
2751
|
]
|
2752
2752
|
|
2753
|
+
[[package]]
|
2754
|
+
name = "wizer"
|
2755
|
+
version = "6.0.0"
|
2756
|
+
source = "git+https://github.com/kateinoigakukun/wizer.git?branch=katei/add-env-option-6.0.0#8e7158013eb3d1059504229eff834eb1f3e33949"
|
2757
|
+
dependencies = [
|
2758
|
+
"anyhow",
|
2759
|
+
"cap-std",
|
2760
|
+
"log",
|
2761
|
+
"rayon",
|
2762
|
+
"wasi-common",
|
2763
|
+
"wasm-encoder 0.202.0",
|
2764
|
+
"wasmparser 0.202.0",
|
2765
|
+
"wasmtime",
|
2766
|
+
]
|
2767
|
+
|
2753
2768
|
[[package]]
|
2754
2769
|
name = "zerocopy"
|
2755
2770
|
version = "0.7.34"
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -23,7 +23,7 @@ Create and save `index.html` page with the following contents:
|
|
23
23
|
|
24
24
|
```html
|
25
25
|
<html>
|
26
|
-
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.
|
26
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.2/dist/browser.script.iife.js"></script>
|
27
27
|
<script type="text/ruby">
|
28
28
|
require "js"
|
29
29
|
|
data/Rakefile
CHANGED
data/docs/cheat_sheet.md
CHANGED
@@ -38,7 +38,7 @@ The easiest way to run Ruby on browser is to use `browser.script.iife.js` script
|
|
38
38
|
|
39
39
|
```html
|
40
40
|
<html>
|
41
|
-
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.
|
41
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.2/dist/browser.script.iife.js"></script>
|
42
42
|
<script type="text/ruby">
|
43
43
|
require "js"
|
44
44
|
JS.global[:document].write "Hello, world!"
|
@@ -51,8 +51,8 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa
|
|
51
51
|
```html
|
52
52
|
<html>
|
53
53
|
<script type="module">
|
54
|
-
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.
|
55
|
-
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.
|
54
|
+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.2/dist/browser/+esm";
|
55
|
+
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.2/dist/ruby+stdlib.wasm");
|
56
56
|
const module = await WebAssembly.compileStreaming(response);
|
57
57
|
const { vm } = await DefaultRubyVM(module);
|
58
58
|
|
@@ -69,11 +69,11 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa
|
|
69
69
|
|
70
70
|
```html
|
71
71
|
<html>
|
72
|
-
<script src="https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.
|
72
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.2/dist/browser.umd.js"></script>
|
73
73
|
<script>
|
74
74
|
const main = async () => {
|
75
75
|
const { DefaultRubyVM } = window["ruby-wasm-wasi"];
|
76
|
-
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.
|
76
|
+
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.2/dist/ruby+stdlib.wasm");
|
77
77
|
const module = await WebAssembly.compileStreaming(response);
|
78
78
|
const { vm } = await DefaultRubyVM(module);
|
79
79
|
|
@@ -128,7 +128,7 @@ end
|
|
128
128
|
|
129
129
|
```html
|
130
130
|
<html>
|
131
|
-
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.
|
131
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.2/dist/browser.script.iife.js"></script>
|
132
132
|
<script type="text/ruby" data-eval="async">
|
133
133
|
require "js"
|
134
134
|
|
@@ -143,8 +143,8 @@ Or using `@ruby/wasm-wasi` package API `RubyVM#evalAsync`:
|
|
143
143
|
```html
|
144
144
|
<html>
|
145
145
|
<script type="module">
|
146
|
-
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.
|
147
|
-
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.
|
146
|
+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.2/dist/browser/+esm";
|
147
|
+
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.4-wasm-wasi@2.7.2/dist/ruby+stdlib.wasm");
|
148
148
|
const module = await WebAssembly.compileStreaming(response);
|
149
149
|
const { vm } = await DefaultRubyVM(module);
|
150
150
|
|
data/ext/ruby_wasm/Cargo.toml
CHANGED
@@ -13,7 +13,7 @@ crate-type = ["cdylib"]
|
|
13
13
|
magnus = { version = "0.7.1", features = ["bytes"] }
|
14
14
|
bytes = "1"
|
15
15
|
wizer = "6.0.0"
|
16
|
-
wasi-vfs-cli = { git = "https://github.com/kateinoigakukun/wasi-vfs/", tag = "v0.5.3" }
|
16
|
+
wasi-vfs-cli = { git = "https://github.com/kateinoigakukun/wasi-vfs/", tag = "v0.5.3-p1" }
|
17
17
|
structopt = "0.3.26"
|
18
18
|
wit-component = "0.216.0"
|
19
19
|
wasm-compose = "0.219.1"
|
@@ -46,7 +46,7 @@ module RubyWasm
|
|
46
46
|
%i[cc cxx ranlib ld ar].each do |name|
|
47
47
|
define_method(name) do
|
48
48
|
@tools_cache ||= {} #: Hash[String, String]
|
49
|
-
@tools_cache[name] ||= find_tool(name)
|
49
|
+
__skip__ = @tools_cache[name] ||= find_tool(name)
|
50
50
|
@tools_cache[name]
|
51
51
|
end
|
52
52
|
end
|
data/lib/ruby_wasm/cli.rb
CHANGED
@@ -266,7 +266,7 @@ module RubyWasm
|
|
266
266
|
source[:patches] = patches_dirs.flat_map do |patches_dir|
|
267
267
|
Dir[File.join(patches_dir, name, "*.patch")]
|
268
268
|
.map { |p| File.expand_path(p) }
|
269
|
-
end
|
269
|
+
end.uniq
|
270
270
|
end
|
271
271
|
|
272
272
|
build_manifest = File.join(root, "build_manifest.json")
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module RubyWasm::Packager::ComponentAdapter
|
2
|
-
module_function
|
3
|
-
|
4
2
|
# The path to the component adapter for the given WASI execution model.
|
5
3
|
#
|
6
4
|
# @param exec_model [String] "command" or "reactor"
|
7
|
-
def wasi_snapshot_preview1(exec_model)
|
5
|
+
def self.wasi_snapshot_preview1(exec_model)
|
8
6
|
File.join(
|
9
7
|
File.dirname(__FILE__),
|
10
8
|
"component_adapter",
|
data/lib/ruby_wasm/version.rb
CHANGED