Skip to content

Commit 6244e4f

Browse files
author
graial
committed
update pr for later after filing predicate bugfix separately
1 parent 87d3151 commit 6244e4f

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

‎Rakefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ BUILDS =
1616
BUILD_SOURCES
1717
.product(BUILD_PROFILES)
1818
.map { |src, profile| [src, "wasm32-unknown-wasip1", profile] } +
19-
BUILD_SOURCES.map { |src| [src, "wasm32-unknown-emscripten", "full"] }
19+
BUILD_SOURCES.map { |src| [src, "wasm32-unknown-emscripten", "full"] } +
20+
BUILD_SOURCES.map { |src| [src, "wasm32-unknown-icp", "minimal"] }
2021

2122
NPM_PACKAGES = [
2223
{

‎lib/ruby_wasm/build/product/product.rb‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def system_triplet_args
1717
args.concat(%W[--host wasm32-wasi])
1818
when "wasm32-unknown-emscripten"
1919
args.concat(%W[--host wasm32-emscripten])
20+
when "wasm32-unknown-icp"
21+
args.concat(%W[--host wasm32-wasi])
2022
else
2123
raise "unknown target: #{@target.triple}"
2224
end

‎lib/ruby_wasm/build/toolchain.rb‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ def self.get(target, options, build_dir = nil)
3333
)
3434
when "wasm32-unknown-emscripten"
3535
return RubyWasm::Emscripten.new
36+
when "wasm32-unknown-icp"
37+
return(
38+
RubyWasm::Icp.new(
39+
build_dir: build_dir,
40+
version: options[:wasi_sdk_version]
41+
)
42+
)
3643
else
3744
raise "unknown target: #{target}"
3845
end
@@ -295,4 +302,10 @@ def find_tool(name)
295302
@tools[name]
296303
end
297304
end
305+
306+
class Icp < WASISDK
307+
def name
308+
"icp"
309+
end
310+
end
298311
end

‎sig/ruby_wasm/build.rbs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ module RubyWasm
272272
def wasi_sysroot?: -> bool
273273
end
274274

275+
class Icp < WASISDK
276+
def name: -> String
277+
end
278+
275279
class Binaryen
276280
@need_fetch_binaryen: bool
277281
@binaryen_path: String

0 commit comments

Comments
 (0)