Skip to content

Commit 12fbca4

Browse files
committed
fix(wit): correct wasi 0.2.3 dependencies
WASI 0.2.3 interfaces have 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]: - tcp/udp use wasi:io/streams, wasi:io/poll, wasi:clocks/monotonic-clock - Added missing dep on @wasi_clocks//:clocks 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 12fbca4

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

wit/wasi_deps.bzl

Lines changed: 16 additions & 3 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
""",
@@ -228,6 +230,7 @@ wit_library(
228230
)
229231

230232
# WASI Sockets interfaces
233+
# Note: tcp/udp use wasi:io/streams, wasi:io/poll, and wasi:clocks/monotonic-clock
231234
http_archive(
232235
name = "wasi_sockets",
233236
urls = ["https://github.com/WebAssembly/wasi-sockets/archive/refs/tags/v0.2.3.tar.gz"],
@@ -241,7 +244,7 @@ wit_library(
241244
srcs = glob(["wit/*.wit"]),
242245
package_name = "wasi:[email protected]",
243246
interfaces = ["network", "udp", "tcp", "udp-create-socket", "tcp-create-socket", "instance-network", "ip-name-lookup"],
244-
deps = ["@wasi_io//:streams"],
247+
deps = ["@wasi_io//:streams", "@wasi_clocks//:clocks"],
245248
visibility = ["//visibility:public"],
246249
)
247250
""",
@@ -267,6 +270,10 @@ wit_library(
267270
)
268271

269272
# WASI HTTP interfaces
273+
# Note: wasi:[email protected] has different dependency structure than 0.2.0:
274+
# - Uses @0.2.3 version references for all WASI dependencies
275+
# - proxy world imports cli/stdout, cli/stderr, cli/stdin, random/random
276+
# - types interface uses io/streams, io/error, io/poll, clocks/monotonic-clock
270277
http_archive(
271278
name = "wasi_http",
272279
urls = ["https://github.com/WebAssembly/wasi-http/archive/refs/tags/v0.2.3.tar.gz"],
@@ -279,8 +286,14 @@ wit_library(
279286
name = "http",
280287
srcs = glob(["wit/*.wit"]),
281288
package_name = "wasi:[email protected]",
282-
interfaces = ["types", "handler", "outgoing-handler", "proxy"],
283-
deps = ["@wasi_io//:streams", "@wasi_clocks//:clocks"],
289+
interfaces = ["types", "incoming-handler", "outgoing-handler"],
290+
world = "proxy",
291+
deps = [
292+
"@wasi_io//:streams",
293+
"@wasi_clocks//:clocks",
294+
"@wasi_cli//:cli",
295+
"@wasi_random//:random",
296+
],
284297
visibility = ["//visibility:public"],
285298
)
286299
""",

0 commit comments

Comments
 (0)