Skip to content

Commit 4089062

Browse files
committed
Add wasip1 and wasip2 os constraints
Adds support for distinguishing WASI Preview 1 and Preview 2: - wasip1: WASI Preview 1 (stable) - wasip2: WASI Preview 2 (ABI-incompatible with Preview 1) - Maintains backward compatibility with 'wasi' alias to 'wasip1'
1 parent 9b6373d commit 4089062

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

os/BUILD

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,22 @@ constraint_value(
111111
constraint_setting = ":os",
112112
)
113113

114-
# WASI (WebAssembly System Interface)
115-
# https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-overview.md
114+
# WASI Preview 1 (WebAssembly System Interface)
115+
# https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md
116116
constraint_value(
117+
name = "wasip1",
118+
constraint_setting = ":os",
119+
)
120+
121+
alias(
117122
name = "wasi",
123+
actual = ":wasip1",
124+
)
125+
126+
# WASI Preview 2 is ABI-incompatible with Preview 1.
127+
# https://github.com/WebAssembly/WASI/blob/main/preview2/README.md
128+
constraint_value(
129+
name = "wasip2",
118130
constraint_setting = ":os",
119131
)
120132

0 commit comments

Comments
 (0)