Skip to content

Commit 5fe3e86

Browse files
rake format
1 parent fea2ed7 commit 5fe3e86

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

lib/ruby_wasm/build_system/product/wasi_vfs.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@ def lib_wasi_vfs_a
2424
end
2525

2626
def cli_product_build_dir
27-
ENV["WASI_VFS_CLI"] ||
28-
File.join(
29-
@build_dir,
30-
RbConfig::CONFIG["host"],
31-
"wasi-vfs-#{WASI_VFS_VERSION}"
32-
)
27+
File.join(
28+
@build_dir,
29+
RbConfig::CONFIG["host"],
30+
"wasi-vfs-#{WASI_VFS_VERSION}"
31+
)
3332
end
3433

3534
def cli_bin_path
36-
File.join(cli_product_build_dir, "wasi-vfs")
35+
ENV["WASI_VFS_CLI"] || File.join(cli_product_build_dir, "wasi-vfs")
3736
end
3837

3938
def name

lib/ruby_wasm/build_system/toolchain/wit_bindgen.rb

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ module RubyWasm
22
class WitBindgen < ::Rake::TaskLib
33
attr_reader :bin_path
44

5-
def initialize(build_dir:, revision: "bb33644b4fd21ecf43761f63c472cdfffe57e300")
5+
def initialize(
6+
build_dir:,
7+
revision: "bb33644b4fd21ecf43761f63c472cdfffe57e300"
8+
)
69
@build_dir = build_dir
710
@tool_dir = File.join(@build_dir, "toolchain", "wit-bindgen")
811
@bin_path = File.join(@tool_dir, "bin", "wit-bindgen")
@@ -13,11 +16,16 @@ def define_task
1316
file @bin_path do
1417
RubyWasm::Toolchain.check_executable("cargo")
1518
sh *[
16-
"cargo", "install",
17-
"--git", "https://github.com/bytecodealliance/wit-bindgen",
18-
"--rev", @revision, "--root", @tool_dir,
19-
"wit-bindgen-cli",
20-
]
19+
"cargo",
20+
"install",
21+
"--git",
22+
"https://github.com/bytecodealliance/wit-bindgen",
23+
"--rev",
24+
@revision,
25+
"--root",
26+
@tool_dir,
27+
"wit-bindgen-cli"
28+
]
2129
end
2230
@task ||= task "wit-bindgen:install" => @bin_path
2331
end
@@ -26,4 +34,4 @@ def install_task
2634
@task
2735
end
2836
end
29-
end
37+
end

0 commit comments

Comments
 (0)