Skip to content

Commit

Permalink
refactor: use include syntax for wasi:clocks
Browse files Browse the repository at this point in the history
This commit uses `include` syntax to simplify the proxy world
by hiding the interfaces from wasi:clock package

Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
  • Loading branch information
Mossaka committed Oct 21, 2023
1 parent 3584f64 commit adc8bdd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions wit/proxy.wit
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package wasi:http;
package wasi:http

/// The `wasi:http/proxy` world captures a widely-implementable intersection of
/// hosts that includes HTTP forward and reverse proxies. Components targeting
/// this world may concurrently stream in and out any number of incoming and
/// outgoing HTTP requests.
world proxy {
/// HTTP proxies have access to time and randomness.
import wasi:clocks/wall-clock;
import wasi:clocks/monotonic-clock;
import wasi:clocks/timezone;
import wasi:random/random;
// HTTP proxies have access to time and randomness.
include wasi:clocks/imports
import wasi:random/random

/// Proxies have standard output and error streams which are expected to
/// terminate in a developer-facing console provided by the host.
Expand Down

0 comments on commit adc8bdd

Please sign in to comment.