@@ -249,7 +249,7 @@ module RubyWasm
249249 def ld : -> String
250250 def ar : -> String
251251
252- def install : -> void
252+ def install : (_CommandExecutor executor) -> void
253253 end
254254
255255 class WASISDK < Toolchain
@@ -265,9 +265,8 @@ module RubyWasm
265265 def wasm_opt : -> String
266266 def wasi_sdk_path : -> String
267267 def download_url : () -> String
268- def binaryen_download_url : (Integer? version) -> String
269- def install_wasi_sdk : -> void
270- def install_binaryen : -> void
268+ def install_wasi_sdk : (_CommandExecutor executor) -> void
269+ def install : (_CommandExecutor executor) -> void
271270 end
272271
273272 class Binaryen
@@ -280,8 +279,8 @@ module RubyWasm
280279 def wasm_opt : -> String
281280 def binaryen_path : -> String
282281 def binaryen_version : -> Integer
283- def download_url : (Integer? version) -> String
284- def install : -> void
282+ def download_url : (Integer version) -> String
283+ def install : (_CommandExecutor executor) -> void
285284 end
286285
287286 class Emscripten < Toolchain
@@ -291,7 +290,12 @@ module RubyWasm
291290 def find_tool : (Symbol name) -> String
292291 end
293292
293+ interface _CommandExecutor
294+ def system : (*_ToS args, ?chdir: String?, ?env: Hash[String, String]?) -> void
295+ end
296+
294297 class BuildExecutor
298+ include _CommandExecutor
295299 @verbose: bool
296300 @github_actions_markup: bool
297301 @process_count: Integer
@@ -300,7 +304,6 @@ module RubyWasm
300304 attr_reader process_count: Integer
301305
302306 def initialize : (?verbose: bool ) -> void
303- def system : (*_ToS args, ?chdir: String?, ?env: Hash[String, String]?) -> void
304307 def rm_rf : (FileUtils::pathlist list) -> void
305308 def rm_f : (FileUtils::pathlist list) -> void
306309 def cp_r : (FileUtils::pathlist src, path dest) -> void
@@ -315,6 +318,10 @@ module RubyWasm
315318 private def _print_command : (Array[_ToS] command, Hash[String, String]? env) -> void
316319 end
317320
321+ class SilentExecutor
322+ include _CommandExecutor
323+ end
324+
318325 class StatusPrinter
319326 @mutex: Mutex
320327 @counter: Integer
0 commit comments