@@ -7,11 +7,6 @@ class WasiVfsProduct < BuildProduct
7
7
def initialize ( build_dir )
8
8
@build_dir = build_dir
9
9
@need_fetch_lib = ENV [ "LIB_WASI_VFS_A" ] . nil?
10
- installed_cli_path =
11
- ENV [ "WASI_VFS_CLI" ] || Toolchain . find_path ( "wasi-vfs" )
12
- @need_fetch_cli = installed_cli_path . nil?
13
- @cli_path =
14
- installed_cli_path || File . join ( cli_product_build_dir , "wasi-vfs" )
15
10
end
16
11
17
12
def lib_product_build_dir
@@ -26,18 +21,6 @@ def lib_wasi_vfs_a
26
21
ENV [ "LIB_WASI_VFS_A" ] || File . join ( lib_product_build_dir , "libwasi_vfs.a" )
27
22
end
28
23
29
- def cli_product_build_dir
30
- File . join (
31
- @build_dir ,
32
- RbConfig ::CONFIG [ "host" ] ,
33
- "wasi-vfs-#{ WASI_VFS_VERSION } "
34
- )
35
- end
36
-
37
- def cli_bin_path
38
- @cli_path
39
- end
40
-
41
24
def name
42
25
"wasi-vfs-#{ WASI_VFS_VERSION } -#{ RbConfig ::CONFIG [ "host" ] } "
43
26
end
@@ -58,26 +41,5 @@ def build(executor)
58
41
executor . mv File . join ( tmpdir , "libwasi_vfs.a" ) , lib_wasi_vfs_a
59
42
end
60
43
end
61
-
62
- def install_cli
63
- return if !@need_fetch_cli || File . exist? ( cli_bin_path )
64
- FileUtils . mkdir_p cli_product_build_dir
65
- zipfile = File . join ( cli_product_build_dir , "wasi-vfs-cli.zip" )
66
- system "curl" , "-L" , "-o" , zipfile , self . cli_download_url
67
- system "unzip" , zipfile , "-d" , cli_product_build_dir
68
- end
69
-
70
- def cli_download_url
71
- assets = [
72
- [ /x86_64-linux/ , "wasi-vfs-cli-x86_64-unknown-linux-gnu.zip" ] ,
73
- [ /x86_64-darwin/ , "wasi-vfs-cli-x86_64-apple-darwin.zip" ] ,
74
- [ /arm64e?-darwin/ , "wasi-vfs-cli-aarch64-apple-darwin.zip" ]
75
- ]
76
- asset = assets . find { |os , _ | os =~ RUBY_PLATFORM } &.at ( 1 )
77
- if asset . nil?
78
- raise "unsupported platform for fetching wasi-vfs CLI: #{ RUBY_PLATFORM } "
79
- end
80
- "https://github.com/kateinoigakukun/wasi-vfs/releases/download/v#{ WASI_VFS_VERSION } /#{ asset } "
81
- end
82
44
end
83
45
end
0 commit comments