@@ -4,21 +4,21 @@ It is intended to be <code>include</code>d in other worlds.</p>
4
4
<ul >
5
5
<li >Imports:
6
6
<ul >
7
- <
li >interface <
a href =
" #wasi_io_poll_0_2_7 " ><
code >wasi:io/
[email protected] .
7 </
code ></
a ></
li >
8
- <
li >interface <
a href =
" #wasi_clocks_monotonic_clock_0_2_7 " ><
code >wasi:clocks/
[email protected] .
7 </
code ></
a ></
li >
9
- <
li >interface <
a href =
" #wasi_clocks_wall_clock_0_2_7 " ><
code >wasi:clocks/
[email protected] .
7 </
code ></
a ></
li >
10
- <
li >interface <
a href =
" #wasi_random_random_0_2_7 " ><
code >wasi:random/
[email protected] .
7 </
code ></
a ></
li >
11
- <
li >interface <
a href =
" #wasi_io_error_0_2_7 " ><
code >wasi:io/
[email protected] .
7 </
code ></
a ></
li >
12
- <
li >interface <
a href =
" #wasi_io_streams_0_2_7 " ><
code >wasi:io/
[email protected] .
7 </
code ></
a ></
li >
13
- <
li >interface <
a href =
" #wasi_cli_stdout_0_2_7 " ><
code >wasi:cli/
[email protected] .
7 </
code ></
a ></
li >
14
- <
li >interface <
a href =
" #wasi_cli_stderr_0_2_7 " ><
code >wasi:cli/
[email protected] .
7 </
code ></
a ></
li >
15
- <
li >interface <
a href =
" #wasi_cli_stdin_0_2_7 " ><
code >wasi:cli/
[email protected] .
7 </
code ></
a ></
li >
16
- <
li >interface <
a href =
" #wasi_http_types_0_2_7 " ><
code >wasi:http/
[email protected] .
7 </
code ></
a ></
li >
17
- <
li >interface <
a href =
" #wasi_http_outgoing_handler_0_2_7 " ><
code >wasi:http/
[email protected] .
7 </
code ></
a ></
li >
7
+ <
li >interface <
a href =
" #wasi_io_poll_0_2_8 " ><
code >wasi:io/
[email protected] .
8 </
code ></
a ></
li >
8
+ <
li >interface <
a href =
" #wasi_clocks_monotonic_clock_0_2_8 " ><
code >wasi:clocks/
[email protected] .
8 </
code ></
a ></
li >
9
+ <
li >interface <
a href =
" #wasi_clocks_wall_clock_0_2_8 " ><
code >wasi:clocks/
[email protected] .
8 </
code ></
a ></
li >
10
+ <
li >interface <
a href =
" #wasi_random_random_0_2_8 " ><
code >wasi:random/
[email protected] .
8 </
code ></
a ></
li >
11
+ <
li >interface <
a href =
" #wasi_io_error_0_2_8 " ><
code >wasi:io/
[email protected] .
8 </
code ></
a ></
li >
12
+ <
li >interface <
a href =
" #wasi_io_streams_0_2_8 " ><
code >wasi:io/
[email protected] .
8 </
code ></
a ></
li >
13
+ <
li >interface <
a href =
" #wasi_cli_stdout_0_2_8 " ><
code >wasi:cli/
[email protected] .
8 </
code ></
a ></
li >
14
+ <
li >interface <
a href =
" #wasi_cli_stderr_0_2_8 " ><
code >wasi:cli/
[email protected] .
8 </
code ></
a ></
li >
15
+ <
li >interface <
a href =
" #wasi_cli_stdin_0_2_8 " ><
code >wasi:cli/
[email protected] .
8 </
code ></
a ></
li >
16
+ <
li >interface <
a href =
" #wasi_http_types_0_2_8 " ><
code >wasi:http/
[email protected] .
8 </
code ></
a ></
li >
17
+ <
li >interface <
a href =
" #wasi_http_outgoing_handler_0_2_8 " ><
code >wasi:http/
[email protected] .
8 </
code ></
a ></
li >
18
18
</ul >
19
19
</li >
20
20
</ul >
21
- <
h2 ><
a id =
" wasi_io_poll_0_2_7 " ></
a >Import interface wasi:io/
[email protected] .
7 </
h2 >
21
+ <
h2 ><
a id =
" wasi_io_poll_0_2_8 " ></
a >Import interface wasi:io/
[email protected] .
8 </
h2 >
22
22
<p >A poll API intended to let users wait for I/O events on multiple handles
23
23
at once.</p >
24
24
<hr />
@@ -71,7 +71,7 @@ being ready for I/O.</p>
71
71
<ul >
72
72
<li ><a id =" poll.0 " ></a > list< ; <code >u32</code >> ; </li >
73
73
</ul >
74
- <
h2 ><
a id =
" wasi_clocks_monotonic_clock_0_2_7 " ></
a >Import interface wasi:clocks/
[email protected] .
7 </
h2 >
74
+ <
h2 ><
a id =
" wasi_clocks_monotonic_clock_0_2_8 " ></
a >Import interface wasi:clocks/
[email protected] .
8 </
h2 >
75
75
<p >WASI Monotonic Clock is a clock API intended to let users measure elapsed
76
76
time.</p >
77
77
<p >It is intended to be portable at least between Unix-family platforms and
@@ -83,8 +83,8 @@ successive reads of the clock will produce non-decreasing values.</p>
83
83
<h4 ><a id =" pollable " ></a ><code >type pollable</code ></h4 >
84
84
<p ><a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a ></p >
85
85
<p >
86
- #### < a id =" instant " ></a >` type instant `
87
- ` u64 `
86
+ < h4 >< a id =" instant " ></a >< code > type instant</ code ></ h4 >
87
+ < p >< code > u64</ code ></ p >
88
88
<p >An instant in time, in nanoseconds. An instant is relative to an
89
89
unspecified initial value, and can only be compared to instances from
90
90
the same monotonic-clock.
@@ -97,6 +97,10 @@ the same monotonic-clock.
97
97
<p >Read the current value of the clock.</p >
98
98
<p >The clock is monotonic, therefore calling this function repeatedly will
99
99
produce a sequence of non-decreasing values.</p >
100
+ <p >For completeness, this function traps if it's not possible to represent
101
+ the value of the clock in an <a href =" #instant " ><code >instant</code ></a >. Consequently, implementations
102
+ should ensure that the starting time is low enough to avoid the
103
+ possibility of overflow in practice.</p >
100
104
<h5 >Return values</h5 >
101
105
<ul >
102
106
<li ><a id =" now.0 " ></a > <a href =" #instant " ><a href =" #instant " ><code >instant</code ></a ></a ></li >
@@ -130,7 +134,7 @@ elapsed from the time this function is invoked.</p>
130
134
<ul >
131
135
<li ><a id =" subscribe_duration.0 " ></a > own< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ; </li >
132
136
</ul >
133
- <
h2 ><
a id =
" wasi_clocks_wall_clock_0_2_7 " ></
a >Import interface wasi:clocks/
[email protected] .
7 </
h2 >
137
+ <
h2 ><
a id =
" wasi_clocks_wall_clock_0_2_8 " ></
a >Import interface wasi:clocks/
[email protected] .
8 </
h2 >
134
138
<p >WASI Wall Clock is a clock API intended to let users query the current
135
139
time. The name " ; wall" ; makes an analogy to a " ; clock on the wall" ; , which
136
140
is not necessarily monotonic as it may be reset.</p >
@@ -171,7 +175,7 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
171
175
<ul >
172
176
<li ><a id =" resolution.0 " ></a > <a href =" #datetime " ><a href =" #datetime " ><code >datetime</code ></a ></a ></li >
173
177
</ul >
174
- <
h2 ><
a id =
" wasi_random_random_0_2_7 " ></
a >Import interface wasi:random/
[email protected] .
7 </
h2 >
178
+ <
h2 ><
a id =
" wasi_random_random_0_2_8 " ></
a >Import interface wasi:random/
[email protected] .
8 </
h2 >
175
179
<p >WASI Random is a random data API.</p >
176
180
<p >It is intended to be portable at least between Unix-family platforms and
177
181
Windows.</p >
@@ -204,7 +208,7 @@ represented as a <code>u64</code>.</p>
204
208
<ul >
205
209
<li ><a id =" get_random_u64.0 " ></a > <code >u64</code ></li >
206
210
</ul >
207
- <
h2 ><
a id =
" wasi_io_error_0_2_7 " ></
a >Import interface wasi:io/
[email protected] .
7 </
h2 >
211
+ <
h2 ><
a id =
" wasi_io_error_0_2_8 " ></
a >Import interface wasi:io/
[email protected] .
8 </
h2 >
208
212
<hr />
209
213
<h3 >Types</h3 >
210
214
<h4 ><a id =" error " ></a ><code >resource error</code ></h4 >
@@ -237,7 +241,7 @@ hazard.</p>
237
241
<ul >
238
242
<li ><a id =" method_error_to_debug_string.0 " ></a > <code >string</code ></li >
239
243
</ul >
240
- <
h2 ><
a id =
" wasi_io_streams_0_2_7 " ></
a >Import interface wasi:io/
[email protected] .
7 </
h2 >
244
+ <
h2 ><
a id =
" wasi_io_streams_0_2_8 " ></
a >Import interface wasi:io/
[email protected] .
8 </
h2 >
241
245
<p >WASI I/O is an I/O abstraction API which is currently focused on providing
242
246
stream types.</p >
243
247
<p >In the future, the component model is expected to add built-in stream types;
@@ -247,10 +251,10 @@ when it does, they are expected to subsume this API.</p>
247
251
<h4 ><a id =" error " ></a ><code >type error</code ></h4 >
248
252
<p ><a href =" #error " ><a href =" #error " ><code >error</code ></a ></a ></p >
249
253
<p >
250
- #### < a id =" pollable " ></a >` type pollable `
251
- [ ` pollable ` ] ( #pollable )
254
+ < h4 >< a id =" pollable " ></a >< code > type pollable</ code ></ h4 >
255
+ < p >< a href = " # pollable" >< a href = " #pollable " >< code >pollable</ code ></ a ></ a ></ p >
252
256
<p >
253
- #### < a id =" stream_error " ></a >` variant stream-error `
257
+ < h4 >< a id =" stream_error " ></a >< code > variant stream-error</ code ></ h4 >
254
258
<p >An error for input-stream and output-stream operations.</p >
255
259
<h5 >Variant Cases</h5 >
256
260
<ul >
@@ -539,46 +543,46 @@ is ready for reading, before performing the <code>splice</code>.</p>
539
543
<ul >
540
544
<li ><a id =" method_output_stream_blocking_splice.0 " ></a > result< ; <code >u64</code >, <a href =" #stream_error " ><a href =" #stream_error " ><code >stream-error</code ></a ></a >> ; </li >
541
545
</ul >
542
- <
h2 ><
a id =
" wasi_cli_stdout_0_2_7 " ></
a >Import interface wasi:cli/
[email protected] .
7 </
h2 >
546
+ <
h2 ><
a id =
" wasi_cli_stdout_0_2_8 " ></
a >Import interface wasi:cli/
[email protected] .
8 </
h2 >
543
547
<hr />
544
548
<h3 >Types</h3 >
545
549
<h4 ><a id =" output_stream " ></a ><code >type output-stream</code ></h4 >
546
550
<p ><a href =" #output_stream " ><a href =" #output_stream " ><code >output-stream</code ></a ></a ></p >
547
551
<p >
548
- ----
552
+ < hr />
549
553
<h3 >Functions</h3 >
550
554
<h4 ><a id =" get_stdout " ></a ><code >get-stdout: func</code ></h4 >
551
555
<h5 >Return values</h5 >
552
556
<ul >
553
557
<li ><a id =" get_stdout.0 " ></a > own< ; <a href =" #output_stream " ><a href =" #output_stream " ><code >output-stream</code ></a ></a >> ; </li >
554
558
</ul >
555
- <
h2 ><
a id =
" wasi_cli_stderr_0_2_7 " ></
a >Import interface wasi:cli/
[email protected] .
7 </
h2 >
559
+ <
h2 ><
a id =
" wasi_cli_stderr_0_2_8 " ></
a >Import interface wasi:cli/
[email protected] .
8 </
h2 >
556
560
<hr />
557
561
<h3 >Types</h3 >
558
562
<h4 ><a id =" output_stream " ></a ><code >type output-stream</code ></h4 >
559
563
<p ><a href =" #output_stream " ><a href =" #output_stream " ><code >output-stream</code ></a ></a ></p >
560
564
<p >
561
- ----
565
+ < hr />
562
566
<h3 >Functions</h3 >
563
567
<h4 ><a id =" get_stderr " ></a ><code >get-stderr: func</code ></h4 >
564
568
<h5 >Return values</h5 >
565
569
<ul >
566
570
<li ><a id =" get_stderr.0 " ></a > own< ; <a href =" #output_stream " ><a href =" #output_stream " ><code >output-stream</code ></a ></a >> ; </li >
567
571
</ul >
568
- <
h2 ><
a id =
" wasi_cli_stdin_0_2_7 " ></
a >Import interface wasi:cli/
[email protected] .
7 </
h2 >
572
+ <
h2 ><
a id =
" wasi_cli_stdin_0_2_8 " ></
a >Import interface wasi:cli/
[email protected] .
8 </
h2 >
569
573
<hr />
570
574
<h3 >Types</h3 >
571
575
<h4 ><a id =" input_stream " ></a ><code >type input-stream</code ></h4 >
572
576
<p ><a href =" #input_stream " ><a href =" #input_stream " ><code >input-stream</code ></a ></a ></p >
573
577
<p >
574
- ----
578
+ < hr />
575
579
<h3 >Functions</h3 >
576
580
<h4 ><a id =" get_stdin " ></a ><code >get-stdin: func</code ></h4 >
577
581
<h5 >Return values</h5 >
578
582
<ul >
579
583
<li ><a id =" get_stdin.0 " ></a > own< ; <a href =" #input_stream " ><a href =" #input_stream " ><code >input-stream</code ></a ></a >> ; </li >
580
584
</ul >
581
- <
h2 ><
a id =
" wasi_http_types_0_2_7 " ></
a >Import interface wasi:http/
[email protected] .
7 </
h2 >
585
+ <
h2 ><
a id =
" wasi_http_types_0_2_8 " ></
a >Import interface wasi:http/
[email protected] .
8 </
h2 >
582
586
<p >This interface defines all of the types and methods for implementing
583
587
HTTP Requests and Responses, both incoming and outgoing, as well as
584
588
their headers, trailers, and bodies.</p >
@@ -587,19 +591,19 @@ their headers, trailers, and bodies.</p>
587
591
<h4 ><a id =" duration " ></a ><code >type duration</code ></h4 >
588
592
<p ><a href =" #duration " ><a href =" #duration " ><code >duration</code ></a ></a ></p >
589
593
<p >
590
- #### < a id =" input_stream " ></a >` type input-stream `
591
- [ ` input-stream ` ] ( #input_stream )
594
+ < h4 >< a id =" input_stream " ></a >< code > type input-stream</ code ></ h4 >
595
+ < p >< a href = " #input_stream " >< a href = " #input_stream " >< code > input-stream</ code ></ a ></ a ></ p >
592
596
<p >
593
- #### < a id =" output_stream " ></a >` type output-stream `
594
- [ ` output-stream ` ] ( #output_stream )
597
+ < h4 >< a id =" output_stream " ></a >< code > type output-stream</ code ></ h4 >
598
+ < p >< a href = " #output_stream " >< a href = " #output_stream " >< code > output-stream</ code ></ a ></ a ></ p >
595
599
<p >
596
- #### < a id =" io_error " ></a >` type io-error `
597
- [ ` error ` ] ( #error )
600
+ < h4 >< a id =" io_error " ></a >< code > type io-error</ code ></ h4 >
601
+ < p >< a href = " # error" >< a href = " #error " >< code >error</ code ></ a ></ a ></ p >
598
602
<p >
599
- #### < a id =" pollable " ></a >` type pollable `
600
- [ ` pollable ` ] ( #pollable )
603
+ < h4 >< a id =" pollable " ></a >< code > type pollable</ code ></ h4 >
604
+ < p >< a href = " # pollable" >< a href = " #pollable " >< code >pollable</ code ></ a ></ a ></ p >
601
605
<p >
602
- #### < a id =" method " ></a >` variant method `
606
+ < h4 >< a id =" method " ></a >< code > variant method</ code ></ h4 >
603
607
<p >This type corresponds to HTTP standard Methods.</p >
604
608
<h5 >Variant Cases</h5 >
605
609
<ul >
@@ -1498,24 +1502,24 @@ but those will be reported by the <a href="#incoming_body"><code>incoming-body</
1498
1502
<ul >
1499
1503
<li ><a id =" method_future_incoming_response_get.0 " ></a > option< ; result< ; result< ; own< ; <a href =" #incoming_response " ><a href =" #incoming_response " ><code >incoming-response</code ></a ></a >> ; , <a href =" #error_code " ><a href =" #error_code " ><code >error-code</code ></a ></a >> ;> ;> ; </li >
1500
1504
</ul >
1501
- <
h2 ><
a id =
" wasi_http_outgoing_handler_0_2_7 " ></
a >Import interface wasi:http/
[email protected] .
7 </
h2 >
1505
+ <
h2 ><
a id =
" wasi_http_outgoing_handler_0_2_8 " ></
a >Import interface wasi:http/
[email protected] .
8 </
h2 >
1502
1506
<p >This interface defines a handler of outgoing HTTP Requests. It should be
1503
1507
imported by components which wish to make HTTP Requests.</p >
1504
1508
<hr />
1505
1509
<h3 >Types</h3 >
1506
1510
<h4 ><a id =" outgoing_request " ></a ><code >type outgoing-request</code ></h4 >
1507
1511
<p ><a href =" #outgoing_request " ><a href =" #outgoing_request " ><code >outgoing-request</code ></a ></a ></p >
1508
1512
<p >
1509
- #### < a id =" request_options " ></a >` type request-options `
1510
- [ ` request-options ` ] ( #request_options )
1513
+ < h4 >< a id =" request_options " ></a >< code > type request-options</ code ></ h4 >
1514
+ < p >< a href = " #request_options " >< a href = " #request_options " >< code > request-options</ code ></ a ></ a ></ p >
1511
1515
<p >
1512
- #### < a id =" future_incoming_response " ></a >` type future-incoming-response `
1513
- [ ` future-incoming-response ` ] ( #future_incoming_response )
1516
+ < h4 >< a id =" future_incoming_response " ></a >< code > type future-incoming-response</ code ></ h4 >
1517
+ < p >< a href = " #future_incoming_response " >< a href = " #future_incoming_response " >< code > future-incoming-response</ code ></ a ></ a ></ p >
1514
1518
<p >
1515
- #### < a id =" error_code " ></a >` type error-code `
1516
- [ ` error-code ` ] ( #error_code )
1519
+ < h4 >< a id =" error_code " ></a >< code > type error-code</ code ></ h4 >
1520
+ < p >< a href = " #error_code " >< a href = " #error_code " >< code > error-code</ code ></ a ></ a ></ p >
1517
1521
<p >
1518
- ----
1522
+ < hr />
1519
1523
<h3 >Functions</h3 >
1520
1524
<h4 ><a id =" handle " ></a ><code >handle: func</code ></h4 >
1521
1525
<p >This function is invoked with an outgoing HTTP Request, and it returns
0 commit comments