Skip to content

Commit bf10349

Browse files
committed
fix(wit): correct wasi 0.2.3 dependencies
WASI 0.2.3 has different dependency structure than 0.2.0: wasi:[email protected]: - monotonic-clock uses wasi:io/[email protected] for pollable - Added missing dep on @wasi_io//:streams wasi:[email protected]: - proxy world imports cli/stdout, cli/stderr, cli/stdin, random/random - types interface uses io/streams, io/error, io/poll, clocks/monotonic-clock - Added missing deps on @wasi_cli//:cli and @wasi_random//:random - Fixed interface names to match actual WIT definitions
1 parent f034afb commit bf10349

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

wit/wasi_deps.bzl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ wit_library(
189189
)
190190

191191
# WASI Clocks interfaces
192+
# Note: monotonic-clock uses wasi:io/[email protected] for pollable
192193
http_archive(
193194
name = "wasi_clocks",
194195
urls = ["https://github.com/WebAssembly/wasi-clocks/archive/refs/tags/v0.2.3.tar.gz"],
@@ -202,6 +203,7 @@ wit_library(
202203
srcs = glob(["wit/*.wit"]),
203204
package_name = "wasi:[email protected]",
204205
interfaces = ["wall-clock", "monotonic-clock"],
206+
deps = ["@wasi_io//:streams"],
205207
visibility = ["//visibility:public"],
206208
)
207209
""",
@@ -267,6 +269,10 @@ wit_library(
267269
)
268270

269271
# WASI HTTP interfaces
272+
# Note: wasi:[email protected] has different dependency structure than 0.2.0:
273+
# - Uses @0.2.3 version references for all WASI dependencies
274+
# - proxy world imports cli/stdout, cli/stderr, cli/stdin, random/random
275+
# - types interface uses io/streams, io/error, io/poll, clocks/monotonic-clock
270276
http_archive(
271277
name = "wasi_http",
272278
urls = ["https://github.com/WebAssembly/wasi-http/archive/refs/tags/v0.2.3.tar.gz"],
@@ -279,8 +285,14 @@ wit_library(
279285
name = "http",
280286
srcs = glob(["wit/*.wit"]),
281287
package_name = "wasi:[email protected]",
282-
interfaces = ["types", "handler", "outgoing-handler", "proxy"],
283-
deps = ["@wasi_io//:streams", "@wasi_clocks//:clocks"],
288+
interfaces = ["types", "incoming-handler", "outgoing-handler"],
289+
world = "proxy",
290+
deps = [
291+
"@wasi_io//:streams",
292+
"@wasi_clocks//:clocks",
293+
"@wasi_cli//:cli",
294+
"@wasi_random//:random",
295+
],
284296
visibility = ["//visibility:public"],
285297
)
286298
""",

0 commit comments

Comments
 (0)