Skip to content

Commit 9f60301

Browse files
Fix rake check:type
1 parent 76c6af6 commit 9f60301

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/ruby_wasm/packager.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ def package(executor, dest_dir, options)
5757
if features.support_component_model?
5858
wasi_virt = RubyWasmExt::WasiVirt.new
5959
wasi_virt.allow_all
60-
[["/bundle", fs.bundle_dir], ["/usr", File.dirname(fs.ruby_root)]].each do |guest, host|
60+
[
61+
{ guest: "/bundle", host: fs.bundle_dir },
62+
{ guest: "/usr", host: File.dirname(fs.ruby_root) }
63+
].each do |map|
64+
map => { guest:, host: }
6165
RubyWasm.logger.debug "Adding files into VFS: #{host} => #{guest}"
6266
wasi_virt.map_dir(guest, host)
6367
end

sig/ruby_wasm/ext.rbs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ module RubyWasmExt
3333
def import_name_map: (Hash[String, String] map) -> void
3434
def encode: () -> bytes
3535
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
3644
end

0 commit comments

Comments
 (0)