ruby_wasm 2.6.1-x64-mingw-ucrt → 2.6.2-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +1 -1
- data/README.md +1 -1
- data/Rakefile +3 -2
- data/docs/cheat_sheet.md +8 -8
- data/lib/ruby_wasm/3.1/ruby_wasm.so +0 -0
- data/lib/ruby_wasm/3.2/ruby_wasm.so +0 -0
- data/lib/ruby_wasm/3.3/ruby_wasm.so +0 -0
- data/lib/ruby_wasm/build/product/crossruby.rb +5 -2
- data/lib/ruby_wasm/build/toolchain.rb +1 -1
- data/lib/ruby_wasm/cli.rb +4 -2
- data/lib/ruby_wasm/packager/core.rb +31 -29
- data/lib/ruby_wasm/packager.rb +17 -2
- data/lib/ruby_wasm/version.rb +1 -1
- data/package-lock.json +840 -386
- data/package.json +2 -2
- data/rakelib/packaging.rake +4 -3
- data/sig/ruby_wasm/build.rbs +1 -0
- data/sig/ruby_wasm/ext.rbs +8 -0
- data/sig/ruby_wasm/packager.rbs +2 -1
- metadata +2 -2
data/package.json
CHANGED
data/rakelib/packaging.rake
CHANGED
@@ -30,9 +30,10 @@ def npm_pkg_rubies_cache_key(pkg)
|
|
30
30
|
require "open3"
|
31
31
|
cmd = build_command + ["--print-ruby-cache-key"]
|
32
32
|
chdir = pkg[:gemfile] ? File.dirname(pkg[:gemfile]) : Dir.pwd
|
33
|
-
|
33
|
+
env = { "RUBY_WASM_ROOT" => LIB_ROOT }
|
34
|
+
stdout, status = Open3.capture2(env, *cmd, chdir: chdir)
|
34
35
|
unless status.success?
|
35
|
-
raise "Command failed with status (#{status.exitstatus}): #{cmd.join ""}"
|
36
|
+
raise "Command failed with status (#{status.exitstatus}): #{cmd.join " "}"
|
36
37
|
end
|
37
38
|
require "json"
|
38
39
|
JSON.parse(stdout)["hexdigest"]
|
@@ -79,7 +80,7 @@ namespace :npm do
|
|
79
80
|
component_path = File.join(pkg_dir, "tmp", "ruby.component.wasm")
|
80
81
|
FileUtils.mkdir_p(File.dirname(component_path))
|
81
82
|
|
82
|
-
sh env.merge("
|
83
|
+
sh env.merge("RUBY_WASM_EXPERIMENTAL_DYNAMIC_LINKING" => "1"),
|
83
84
|
*build_command, "-o", component_path
|
84
85
|
sh "npx", "jco", "transpile",
|
85
86
|
"--no-wasi-shim", "--instantiation", "--valid-lifting-optimization",
|
data/sig/ruby_wasm/build.rbs
CHANGED
data/sig/ruby_wasm/ext.rbs
CHANGED
@@ -33,4 +33,12 @@ module RubyWasmExt
|
|
33
33
|
def import_name_map: (Hash[String, String] map) -> void
|
34
34
|
def encode: () -> bytes
|
35
35
|
end
|
36
|
+
|
37
|
+
class WasiVirt
|
38
|
+
def initialize: () -> void
|
39
|
+
def allow_all: () -> void
|
40
|
+
def map_dir: (String guest_path, String host_path) -> void
|
41
|
+
def finish: () -> bytes
|
42
|
+
def compose: (bytes component_bytes) -> bytes
|
43
|
+
end
|
36
44
|
end
|
data/sig/ruby_wasm/packager.rbs
CHANGED
@@ -46,7 +46,7 @@ class RubyWasm::Packager
|
|
46
46
|
|
47
47
|
def root: () -> string
|
48
48
|
|
49
|
-
ALL_DEFAULT_EXTS:
|
49
|
+
ALL_DEFAULT_EXTS: String
|
50
50
|
|
51
51
|
def build_options: () -> Hash[Symbol, untyped]
|
52
52
|
def full_build_options: () -> Hash[Symbol, untyped]
|
@@ -77,6 +77,7 @@ class RubyWasm::Packager
|
|
77
77
|
def build_gem_exts: (RubyWasm::BuildExecutor, string gem_home) -> void
|
78
78
|
def link_gem_exts: (RubyWasm::BuildExecutor, string ruby_root, string gem_home, bytes module_bytes) -> bytes
|
79
79
|
def wasi_exec_model: () -> String
|
80
|
+
def with_unbundled_env: () { () -> void } -> void
|
80
81
|
end
|
81
82
|
|
82
83
|
class DynamicLinking < RubyWasm::Packager::Core::BuildStrategy
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_wasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- Yuta Saito
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby to WebAssembly toolkit. This gem takes Ruby code and Gemfile, and
|
14
14
|
packages them with Ruby runtime into a WebAssembly binary.
|