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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8c30db752d99a73771fdaf73c72a139b22757ba34d0cfd20b6b319eb2dae41f
4
- data.tar.gz: c00f1796d9e1b2008c6e08690f41e4d8037d43732ce6894480f2ab34bee6439d
3
+ metadata.gz: f509aedcac0dfbe264b9dff6984f1fbd71fbcac4a462783b0a3f8b182410440b
4
+ data.tar.gz: 390c1306c8c7b28d8583ebdf9bcdd69ff72d1ad56435923871090dbabb301421
5
5
  SHA512:
6
- metadata.gz: 6e78b6ceb43db9a27b9928aa048b1c4b0ab647053e6205ca68e9d5b1cdb2bee685828e7716ff87a6553a8216d6fe60682af9a76640cb2aab56c8c9f74ebdd5ef
7
- data.tar.gz: 6fe16881179f2cfee7c54c24d8d963a774d041e5c225f1cad07300c33ecb04d2cccf7c95b7748cc1a1b48685c1305da781752a7cff27fec5d9ce54482c52b853
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
- $ (cd packages/gems/js/ && gem build && gem push js-*.gem)
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.5.2-2024-05-04-a
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.5.2/dist/browser.script.iife.js"></script>
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.5.2/dist/browser.script.iife.js"></script>
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.5.2/dist/browser/+esm";
55
- const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.5.2/dist/ruby+stdlib.wasm");
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.5.2/dist/browser.umd.js"></script>
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.5.2/dist/ruby+stdlib.wasm");
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.5.2/dist/browser.script.iife.js"></script>
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.5.2/dist/browser/+esm";
147
- const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/3.3-wasm-wasi@2.5.2/dist/ruby+stdlib.wasm");
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
 
@@ -34,6 +34,7 @@ module RubyWasm
34
34
  def make_args(crossruby)
35
35
  make_args = []
36
36
  make_args << "CC=#{@toolchain.cc}"
37
+ make_args << "CXX=#{@toolchain.cc}"
37
38
  make_args << "LD=#{@toolchain.ld}"
38
39
  make_args << "AR=#{@toolchain.ar}"
39
40
  make_args << "RANLIB=#{@toolchain.ranlib}"
@@ -26,6 +26,7 @@ module RubyWasm
26
26
  def tools_args
27
27
  args = []
28
28
  args << "CC=#{@toolchain.cc}"
29
+ args << "CXX=#{@toolchain.cxx}"
29
30
  args << "LD=#{@toolchain.ld}"
30
31
  args << "AR=#{@toolchain.ar}"
31
32
  args << "RANLIB=#{@toolchain.ranlib}"
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module RubyWasm
2
- VERSION = "2.5.2"
2
+ VERSION = "2.6.0"
3
3
  end
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.5.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.5.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.5.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.5.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.5.2",
4823
+ "version": "2.6.0",
4824
4824
  "license": "MIT",
4825
4825
  "dependencies": {
4826
4826
  "tslib": "^2.6.1"
@@ -242,6 +242,7 @@ module RubyWasm
242
242
  def self.find_path: (String command) -> String?
243
243
  def self.check_executable: (String command) -> String
244
244
  def cc: -> String
245
+ def cxx: -> String
245
246
  def ranlib: -> String
246
247
  def ld: -> String
247
248
  def ar: -> String
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.5.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-04 00:00:00.000000000 Z
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.