ruby_wasm 2.5.2 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +3 -2
- data/README.md +1 -1
- data/docs/cheat_sheet.md +8 -8
- data/lib/ruby_wasm/build/product/crossruby.rb +1 -0
- data/lib/ruby_wasm/build/product/product.rb +1 -0
- data/lib/ruby_wasm/build/toolchain.rb +3 -2
- data/lib/ruby_wasm/version.rb +1 -1
- data/package-lock.json +5 -5
- data/sig/ruby_wasm/build.rbs +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f509aedcac0dfbe264b9dff6984f1fbd71fbcac4a462783b0a3f8b182410440b
|
4
|
+
data.tar.gz: 390c1306c8c7b28d8583ebdf9bcdd69ff72d1ad56435923871090dbabb301421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cf577ede9835215d5b8a23936ed515e6e104dba588a52b1bb43127e9e907648d3739c8b452448804266ef955767c12b2a251061e36f61b6f78185e830fad41e
|
7
|
+
data.tar.gz: eb7cc82ef12d8ca024ce0e24a47b57aea938ad422c76a9f26a41dfc18d35103cb5efa37986850e23b712e494ebc6adad259005ef13e730bc5c2910d5c4ba9dac
|
data/CONTRIBUTING.md
CHANGED
@@ -110,7 +110,8 @@ $ git commit -m"Bump version to 0.6.0"
|
|
110
110
|
$ git tag 0.6.0
|
111
111
|
$ git push origin 0.6.0
|
112
112
|
$ for pkg in pkg/ruby_wasm-*; do gem push $pkg; done
|
113
|
-
$
|
113
|
+
$ gem build && gem push ruby_wasm-*.gem && rm ruby_wasm-*.gem
|
114
|
+
$ (cd packages/gems/js/ && gem build && gem push js-*.gem && rm js-*.gem)
|
114
115
|
```
|
115
116
|
|
116
117
|
## Release Channels
|
@@ -124,5 +125,5 @@ $ npm install --save @ruby/wasm-wasi@latest
|
|
124
125
|
# or if you want the nightly snapshot
|
125
126
|
$ npm install --save @ruby/wasm-wasi@next
|
126
127
|
# or you can specify the exact snapshot version
|
127
|
-
$ npm install --save @ruby/wasm-wasi@2.
|
128
|
+
$ npm install --save @ruby/wasm-wasi@2.6.0-2024-05-05-a
|
128
129
|
```
|
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.3-wasm-wasi@2.
|
26
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.6.0/dist/browser.script.iife.js"></script>
|
27
27
|
<script type="text/ruby">
|
28
28
|
require "js"
|
29
29
|
|
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.3-wasm-wasi@2.
|
41
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.6.0/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.
|
55
|
-
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.
|
54
|
+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.6.0/dist/browser/+esm";
|
55
|
+
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.6.0/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.
|
72
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.6.0/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.3-wasm-wasi@2.
|
76
|
+
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.6.0/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.3-wasm-wasi@2.
|
131
|
+
<script src="https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.6.0/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.
|
147
|
-
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.
|
146
|
+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.6.0/dist/browser/+esm";
|
147
|
+
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.6.0/dist/ruby+stdlib.wasm");
|
148
148
|
const module = await WebAssembly.compileStreaming(response);
|
149
149
|
const { vm } = await DefaultRubyVM(module);
|
150
150
|
|
@@ -43,7 +43,7 @@ module RubyWasm
|
|
43
43
|
tool
|
44
44
|
end
|
45
45
|
|
46
|
-
%i[cc ranlib ld ar].each do |name|
|
46
|
+
%i[cc cxx ranlib ld ar].each do |name|
|
47
47
|
define_method(name) do
|
48
48
|
@tools_cache ||= {}
|
49
49
|
@tools_cache[name] ||= find_tool(name)
|
@@ -84,6 +84,7 @@ module RubyWasm
|
|
84
84
|
|
85
85
|
@tools = {
|
86
86
|
cc: "#{wasi_sdk_path}/bin/clang",
|
87
|
+
cxx: "#{wasi_sdk_path}/bin/clang++",
|
87
88
|
ld: "#{wasi_sdk_path}/bin/clang",
|
88
89
|
ar: "#{wasi_sdk_path}/bin/llvm-ar",
|
89
90
|
ranlib: "#{wasi_sdk_path}/bin/llvm-ranlib"
|
@@ -178,7 +179,7 @@ module RubyWasm
|
|
178
179
|
|
179
180
|
class Emscripten < Toolchain
|
180
181
|
def initialize
|
181
|
-
@tools = { cc: "emcc", ld: "emcc", ar: "emar", ranlib: "emranlib" }
|
182
|
+
@tools = { cc: "emcc", cxx: "em++", ld: "emcc", ar: "emar", ranlib: "emranlib" }
|
182
183
|
@name = "emscripten"
|
183
184
|
end
|
184
185
|
|
data/lib/ruby_wasm/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -4783,7 +4783,7 @@
|
|
4783
4783
|
},
|
4784
4784
|
"packages/npm-packages/ruby-3.2-wasm-wasi": {
|
4785
4785
|
"name": "@ruby/3.2-wasm-wasi",
|
4786
|
-
"version": "2.
|
4786
|
+
"version": "2.6.0",
|
4787
4787
|
"license": "MIT",
|
4788
4788
|
"dependencies": {
|
4789
4789
|
"@ruby/wasm-wasi": "^2.0.0"
|
@@ -4791,7 +4791,7 @@
|
|
4791
4791
|
},
|
4792
4792
|
"packages/npm-packages/ruby-3.3-wasm-wasi": {
|
4793
4793
|
"name": "@ruby/3.3-wasm-wasi",
|
4794
|
-
"version": "2.
|
4794
|
+
"version": "2.6.0",
|
4795
4795
|
"license": "MIT",
|
4796
4796
|
"dependencies": {
|
4797
4797
|
"@ruby/wasm-wasi": "^2.0.0"
|
@@ -4799,12 +4799,12 @@
|
|
4799
4799
|
},
|
4800
4800
|
"packages/npm-packages/ruby-head-wasm-emscripten": {
|
4801
4801
|
"name": "@ruby/head-wasm-emscripten",
|
4802
|
-
"version": "2.
|
4802
|
+
"version": "2.6.0",
|
4803
4803
|
"license": "MIT"
|
4804
4804
|
},
|
4805
4805
|
"packages/npm-packages/ruby-head-wasm-wasi": {
|
4806
4806
|
"name": "@ruby/head-wasm-wasi",
|
4807
|
-
"version": "2.
|
4807
|
+
"version": "2.6.0",
|
4808
4808
|
"license": "MIT",
|
4809
4809
|
"dependencies": {
|
4810
4810
|
"@ruby/wasm-wasi": "^2.0.0"
|
@@ -4820,7 +4820,7 @@
|
|
4820
4820
|
},
|
4821
4821
|
"packages/npm-packages/ruby-wasm-wasi": {
|
4822
4822
|
"name": "@ruby/wasm-wasi",
|
4823
|
-
"version": "2.
|
4823
|
+
"version": "2.6.0",
|
4824
4824
|
"license": "MIT",
|
4825
4825
|
"dependencies": {
|
4826
4826
|
"tslib": "^2.6.1"
|
data/sig/ruby_wasm/build.rbs
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_wasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuta Saito
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2024-05-
|
10
|
+
date: 2024-05-05 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: Ruby to WebAssembly toolkit. This gem takes Ruby code and Gemfile, and
|
13
13
|
packages them with Ruby runtime into a WebAssembly binary.
|