Skip to content

Commit 40a1f24

Browse files
eggplantshsbt
authored andcommitted
Update wasm-wasi from 0.5.0 to 2.4.1 and Add CRuby 3.3
1 parent 3ab6c36 commit 40a1f24

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

app/ruby_engine.rb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,16 @@ def loading(part = nil)
3939
# When you update the engines, ensure that they are tested correctly.
4040
# Update the engine list also in spec/playground_spec.
4141
ENGINES = [
42+
# https://www.jsdelivr.com/package/npm/@ruby/3.2-wasm-wasi?tab=files&path=dist&version=2.4.1
4243
CRubyWASI.new(
43-
"https://cdn.jsdelivr.net/npm/[email protected]/dist/ruby.wasm",
44-
"3.2.0"
44+
"https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/ruby.wasm",
45+
"3.2.2"
46+
),
47+
# https://www.jsdelivr.com/package/npm/@ruby/3.3-wasm-wasi?tab=files&path=dist&version=2.4.1
48+
CRubyWASI.new(
49+
"https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/ruby.wasm",
50+
"3.3.0"
4551
),
46-
# FIXME(katei): Head build is no longer compatible with [email protected],
47-
# so we should have a worker for each version of CRuby to load corresponding ruby-*-wasm-wasi
48-
# CRubyWASI.new(
49-
# "https://cdn.jsdelivr.net/npm/ruby-head-wasm-wasi@next/dist/ruby.wasm",
50-
# "3.3.0dev"
51-
# ),
52-
5352
# Opal.new,
5453
OpalWebWorker.new("1.7.1"),
5554
].each_with_object({}) do |engine, hash|

app/ruby_engine/cruby_wasi.rb

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@
55
class RubyEngine
66
class CRubyWASI < RubyEngine
77
REQUIRED_SCRIPTS = [
8-
{
9-
src: "https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js",
10-
integrity: "sha256-EVJ2qiXD74E5qZpFm9MMNqOf5Buo+P2VQKiqOzOKGpg=",
11-
crossorigin: "anonymous"
12-
},
13-
{
14-
src: "https://cdn.jsdelivr.net/npm/@wasmer/[email protected]/lib/index.iife.js",
15-
integrity: "sha256-sOd4ekxVsN4PXhR+cn/4uNAxeQOJRcsaW5qalYfvkTw=",
16-
crossorigin: "anonymous"
17-
},
18-
{
19-
src: "https://cdn.jsdelivr.net/npm/@wasmer/[email protected]/lib/index.iife.js",
20-
integrity: "sha256-FslFp/Vq4bDf2GXu+9QyBEDLtEWO3fkMjpyOaJMHJT8=",
21-
crossorigin: "anonymous"
22-
}
8+
{
9+
# https://www.jsdelivr.com/package/npm/@ruby/wasm-wasi?version=2.4.1&tab=files&path=dist
10+
src: "https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/index.umd.js",
11+
integrity: "sha256-300VwPu5WqY+8LDKdE4RQwDglgJSpMtLFLgyf508bv0=",
12+
crossorigin: "anonymous"
13+
},
14+
{
15+
src: "https://cdn.jsdelivr.net/npm/@wasmer/[email protected]/lib/index.iife.js",
16+
integrity: "sha256-sOd4ekxVsN4PXhR+cn/4uNAxeQOJRcsaW5qalYfvkTw=",
17+
crossorigin: "anonymous"
18+
},
19+
{
20+
src: "https://cdn.jsdelivr.net/npm/@wasmer/[email protected]/lib/index.iife.js",
21+
integrity: "sha256-FslFp/Vq4bDf2GXu+9QyBEDLtEWO3fkMjpyOaJMHJT8=",
22+
crossorigin: "anonymous"
23+
}
2324
]
2425

2526
def initialize(ruby_wasm_url, version)

app/try_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class TryRuby
1515
RUBY
1616
INITIAL_TRY_RESULT = 'Welcome ' * 3
1717

18-
DEFAULT_RUBY_ENGINE = "cruby-3.2.0"
18+
DEFAULT_RUBY_ENGINE = "cruby-3.2.2"
1919

2020
def self.start
2121
instance

spec/playground_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RSpec.describe "Playground", type: :feature, js: true do
44
context "engine" do
5-
engines = ["opal-ww-1.7.1", "cruby-3.2.0"]
5+
engines = ["opal-ww-1.7.1", "cruby-3.2.2", "cruby-3.3.0"]
66
engines.each do |engine|
77
context engine do
88
before :each do

0 commit comments

Comments
 (0)