@@ -6,26 +6,26 @@ outgoing HTTP requests.</p>
6
6
<ul >
7
7
<li >Imports:
8
8
<ul >
9
- <li >interface <a href =" #wasi:clocks_wall_clock " ><code >wasi:clocks/wall-clock</code ></a ></li >
10
- <li >interface <a href =" #wasi:io_poll " ><code >wasi:io/poll</code ></a ></li >
11
- <li >interface <a href =" #wasi:clocks_monotonic_clock " ><code >wasi:clocks/monotonic-clock</code ></a ></li >
12
- <li >interface <a href =" #wasi:clocks_timezone " ><code >wasi:clocks/timezone </code ></a ></li >
13
- <li >interface <a href =" #wasi:random_random " ><code >wasi:random/random </code ></a ></li >
14
- <li >interface <a href =" #wasi:io_streams " ><code >wasi:io/streams</code ></a ></li >
15
- <li >interface <a href =" #wasi:cli_stdout " ><code >wasi:cli/stdout</code ></a ></li >
16
- <li >interface <a href =" #wasi:cli_stderr " ><code >wasi:cli/stderr</code ></a ></li >
17
- <li >interface <a href =" #wasi:cli_stdin " ><code >wasi:cli/stdin</code ></a ></li >
18
- <li >interface <a href =" #wasi:http_types " ><code >wasi:http/types</code ></a ></li >
19
- <li >interface <a href =" #wasi:http_outgoing_handler " ><code >wasi:http/outgoing-handler</code ></a ></li >
9
+ <li >interface <a href =" #wasi:clocks_wall_clock_0.2.0_rc_2023_11_10 " ><code >wasi:clocks/wall-clock@0.2.0-rc-2023-11-10 </code ></a ></li >
10
+ <li >interface <a href =" #wasi:io_poll_0.2.0_rc_2023_11_10 " ><code >wasi:io/poll@0.2.0-rc-2023-11-10 </code ></a ></li >
11
+ <li >interface <a href =" #wasi:clocks_monotonic_clock_0.2.0_rc_2023_11_10 " ><code >wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10 </code ></a ></li >
12
+ <li >interface <a href =" #wasi:random_random_0.2.0_rc_2023_11_10 " ><code >wasi:random/random@0.2.0-rc-2023-11-10 </code ></a ></li >
13
+ <li >interface <a href =" #wasi:io_error_0.2.0_rc_2023_11_10 " ><code >wasi:io/error@0.2.0-rc-2023-11-10 </code ></a ></li >
14
+ <li >interface <a href =" #wasi:io_streams_0.2.0_rc_2023_11_10 " ><code >wasi:io/streams@0.2.0-rc-2023-11-10 </code ></a ></li >
15
+ <li >interface <a href =" #wasi:cli_stdout_0.2.0_rc_2023_11_10 " ><code >wasi:cli/stdout@0.2.0-rc-2023-11-10 </code ></a ></li >
16
+ <li >interface <a href =" #wasi:cli_stderr_0.2.0_rc_2023_11_10 " ><code >wasi:cli/stderr@0.2.0-rc-2023-11-10 </code ></a ></li >
17
+ <li >interface <a href =" #wasi:cli_stdin_0.2.0_rc_2023_11_10 " ><code >wasi:cli/stdin@0.2.0-rc-2023-11-10 </code ></a ></li >
18
+ <li >interface <a href =" #wasi:http_types_0.2.0_rc_2023_11_10 " ><code >wasi:http/types@0.2.0-rc-2023-11-10 </code ></a ></li >
19
+ <li >interface <a href =" #wasi:http_outgoing_handler_0.2.0_rc_2023_11_10 " ><code >wasi:http/outgoing-handler@0.2.0-rc-2023-11-10 </code ></a ></li >
20
20
</ul >
21
21
</li >
22
22
<li >Exports:
23
23
<ul >
24
- <li >interface <a href =" #wasi:http_incoming_handler " ><code >wasi:http/incoming-handler</code ></a ></li >
24
+ <li >interface <a href =" #wasi:http_incoming_handler_0.2.0_rc_2023_11_10 " ><code >wasi:http/incoming-handler@0.2.0-rc-2023-11-10 </code ></a ></li >
25
25
</ul >
26
26
</li >
27
27
</ul >
28
- <h2 ><a name =" wasi:clocks_wall_clock " >Import interface wasi:clocks/wall-clock</a ></h2 >
28
+ <h2 ><a name =" wasi:clocks_wall_clock_0.2.0_rc_2023_11_10 " >Import interface wasi:clocks/wall-clock@0.2.0-rc-2023-11-10 </a ></h2 >
29
29
<p >WASI Wall Clock is a clock API intended to let users query the current
30
30
time. The name " ; wall" ; makes an analogy to a " ; clock on the wall" ; , which
31
31
is not necessarily monotonic as it may be reset.</p >
@@ -66,7 +66,7 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
66
66
<ul >
67
67
<li ><a name =" resolution.0 " ></a > <a href =" #datetime " ><a href =" #datetime " ><code >datetime</code ></a ></a ></li >
68
68
</ul >
69
- <h2 ><a name =" wasi:io_poll " >Import interface wasi:io/poll</a ></h2 >
69
+ <h2 ><a name =" wasi:io_poll_0.2.0_rc_2023_11_10 " >Import interface wasi:io/poll@0.2.0-rc-2023-11-10 </a ></h2 >
70
70
<p >A poll API intended to let users wait for I/O events on multiple handles
71
71
at once.</p >
72
72
<hr />
@@ -116,7 +116,7 @@ being reaedy for I/O.</p>
116
116
<ul >
117
117
<li ><a name =" poll.0 " ></a > list< ; <code >u32</code >> ; </li >
118
118
</ul >
119
- <h2 ><a name =" wasi:clocks_monotonic_clock " >Import interface wasi:clocks/monotonic-clock</a ></h2 >
119
+ <h2 ><a name =" wasi:clocks_monotonic_clock_0.2.0_rc_2023_11_10 " >Import interface wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10 </a ></h2 >
120
120
<p >WASI Monotonic Clock is a clock API intended to let users measure elapsed
121
121
time.</p >
122
122
<p >It is intended to be portable at least between Unix-family platforms and
@@ -177,72 +177,7 @@ occured.</p>
177
177
<ul >
178
178
<li ><a name =" subscribe_duration.0 " ></a > own< ; <a href =" #pollable " ><a href =" #pollable " ><code >pollable</code ></a ></a >> ; </li >
179
179
</ul >
180
- <h2 ><a name =" wasi:clocks_timezone " >Import interface wasi:clocks/timezone</a ></h2 >
181
- <hr />
182
- <h3 >Types</h3 >
183
- <h4 ><a name =" datetime " ><code >type datetime</code ></a ></h4 >
184
- <p ><a href =" #datetime " ><a href =" #datetime " ><code >datetime</code ></a ></a ></p >
185
- <p >
186
- #### <a name =" timezone_display " >` record timezone-display ` </a >
187
- <p >Information useful for displaying the timezone of a specific <a href =" #datetime " ><code >datetime</code ></a >.</p >
188
- <p >This information may vary within a single <code >timezone</code > to reflect daylight
189
- saving time adjustments.</p >
190
- <h5 >Record Fields</h5 >
191
- <ul >
192
- <li >
193
- <p ><a name =" timezone_display.utc_offset " ><a href =" #utc_offset " ><code >utc-offset</code ></a ></a >: <code >s32</code ></p >
194
- <p >The number of seconds difference between UTC time and the local
195
- time of the timezone.
196
- <p >The returned value will always be less than 86400 which is the
197
- number of seconds in a day (24<em >60</em >60).</p >
198
- <p >In implementations that do not expose an actual time zone, this
199
- should return 0.</p >
200
- </li >
201
- <li >
202
- <p ><a name =" timezone_display.name " ><code >name</code ></a >: <code >string</code ></p >
203
- <p >The abbreviated name of the timezone to display to a user. The name
204
- ` UTC ` indicates Coordinated Universal Time. Otherwise, this should
205
- reference local standards for the name of the time zone.
206
- <p >In implementations that do not expose an actual time zone, this
207
- should be the string <code >UTC</code >.</p >
208
- <p >In time zones that do not have an applicable name, a formatted
209
- representation of the UTC offset may be returned, such as <code >-04:00</code >.</p >
210
- </li >
211
- <li >
212
- <p ><a name =" timezone_display.in_daylight_saving_time " ><code >in-daylight-saving-time</code ></a >: <code >bool</code ></p >
213
- <p >Whether daylight saving time is active.
214
- <p >In implementations that do not expose an actual time zone, this
215
- should return false.</p >
216
- </li >
217
- </ul >
218
- <hr />
219
- <h3 >Functions</h3 >
220
- <h4 ><a name =" display " ><code >display: func</code ></a ></h4 >
221
- <p >Return information needed to display the given <a href =" #datetime " ><code >datetime</code ></a >. This includes
222
- the UTC offset, the time zone name, and a flag indicating whether
223
- daylight saving time is active.</p >
224
- <p >If the timezone cannot be determined for the given <a href =" #datetime " ><code >datetime</code ></a >, return a
225
- <a href =" #timezone_display " ><code >timezone-display</code ></a > for <code >UTC</code > with a <a href =" #utc_offset " ><code >utc-offset</code ></a > of 0 and no daylight
226
- saving time.</p >
227
- <h5 >Params</h5 >
228
- <ul >
229
- <li ><a name =" display.when " ><code >when</code ></a >: <a href =" #datetime " ><a href =" #datetime " ><code >datetime</code ></a ></a ></li >
230
- </ul >
231
- <h5 >Return values</h5 >
232
- <ul >
233
- <li ><a name =" display.0 " ></a > <a href =" #timezone_display " ><a href =" #timezone_display " ><code >timezone-display</code ></a ></a ></li >
234
- </ul >
235
- <h4 ><a name =" utc_offset " ><code >utc-offset: func</code ></a ></h4 >
236
- <p >The same as <a href =" #display " ><code >display</code ></a >, but only return the UTC offset.</p >
237
- <h5 >Params</h5 >
238
- <ul >
239
- <li ><a name =" utc_offset.when " ><code >when</code ></a >: <a href =" #datetime " ><a href =" #datetime " ><code >datetime</code ></a ></a ></li >
240
- </ul >
241
- <h5 >Return values</h5 >
242
- <ul >
243
- <li ><a name =" utc_offset.0 " ></a > <code >s32</code ></li >
244
- </ul >
245
- <h2 ><a name =" wasi:random_random " >Import interface wasi:random/random</a ></h2 >
180
+ <h2 ><a name =" wasi:random_random_0.2.0_rc_2023_11_10 " >Import interface wasi:random/random@0.2.0-rc-2023-11-10</a ></h2 >
246
181
<p >WASI Random is a random data API.</p >
247
182
<p >It is intended to be portable at least between Unix-family platforms and
248
183
Windows.</p >
@@ -275,18 +210,41 @@ represented as a <code>u64</code>.</p>
275
210
<ul >
276
211
<li ><a name =" get_random_u64.0 " ></a > <code >u64</code ></li >
277
212
</ul >
278
- <h2 ><a name =" wasi:io_streams " >Import interface wasi:io/streams</a ></h2 >
213
+ <h2 ><a name =" wasi:io_error_0.2.0_rc_2023_11_10 " >Import interface wasi:io/error@0.2.0-rc-2023-11-10</a ></h2 >
214
+ <hr />
215
+ <h3 >Types</h3 >
216
+ <h4 ><a name =" error " ><code >resource error</code ></a ></h4 >
217
+ <hr />
218
+ <h3 >Functions</h3 >
219
+ <h4 ><a name =" method_error.to_debug_string " ><code >[method]error.to-debug-string: func</code ></a ></h4 >
220
+ <p >Returns a string that is suitable to assist humans in debugging
221
+ this error.</p >
222
+ <p >WARNING: The returned string should not be consumed mechanically!
223
+ It may change across platforms, hosts, or other implementation
224
+ details. Parsing this string is a major platform-compatibility
225
+ hazard.</p >
226
+ <h5 >Params</h5 >
227
+ <ul >
228
+ <li ><a name =" method_error.to_debug_string.self " ><code >self</code ></a >: borrow< ; <a href =" #error " ><a href =" #error " ><code >error</code ></a ></a >> ; </li >
229
+ </ul >
230
+ <h5 >Return values</h5 >
231
+ <ul >
232
+ <li ><a name =" method_error.to_debug_string.0 " ></a > <code >string</code ></li >
233
+ </ul >
234
+ <h2 ><a name =" wasi:io_streams_0.2.0_rc_2023_11_10 " >Import interface wasi:io/streams@0.2.0-rc-2023-11-10</a ></h2 >
279
235
<p >WASI I/O is an I/O abstraction API which is currently focused on providing
280
236
stream types.</p >
281
237
<p >In the future, the component model is expected to add built-in stream types;
282
238
when it does, they are expected to subsume this API.</p >
283
239
<hr />
284
240
<h3 >Types</h3 >
285
- <h4 ><a name =" pollable " ><code >type pollable </code ></a ></h4 >
286
- <p ><a href =" #pollable " ><a href =" #pollable " ><code >pollable </code ></a ></a ></p >
241
+ <h4 ><a name =" error " ><code >type error </code ></a ></h4 >
242
+ <p ><a href =" #error " ><a href =" #error " ><code >error </code ></a ></a ></p >
287
243
<p >
288
- #### <a name =" error " >` resource error ` </a >
289
- <h4 ><a name =" stream_error " ><code >variant stream-error</code ></a ></h4 >
244
+ #### <a name =" pollable " >` type pollable ` </a >
245
+ [ ` pollable ` ] ( #pollable )
246
+ <p >
247
+ #### <a name =" stream_error " >` variant stream-error ` </a >
290
248
<p >An error for input-stream and output-stream operations.</p >
291
249
<h5 >Variant Cases</h5 >
292
250
<ul >
@@ -306,20 +264,6 @@ future operations.
306
264
<h4 ><a name =" output_stream " ><code >resource output-stream</code ></a ></h4 >
307
265
<hr />
308
266
<h3 >Functions</h3 >
309
- <h4 ><a name =" method_error.to_debug_string " ><code >[method]error.to-debug-string: func</code ></a ></h4 >
310
- <p >Returns a string that's suitable to assist humans in debugging this
311
- error.</p >
312
- <p >The returned string will change across platforms and hosts which
313
- means that parsing it, for example, would be a
314
- platform-compatibility hazard.</p >
315
- <h5 >Params</h5 >
316
- <ul >
317
- <li ><a name =" method_error.to_debug_string.self " ><code >self</code ></a >: borrow< ; <a href =" #error " ><a href =" #error " ><code >error</code ></a ></a >> ; </li >
318
- </ul >
319
- <h5 >Return values</h5 >
320
- <ul >
321
- <li ><a name =" method_error.to_debug_string.0 " ></a > <code >string</code ></li >
322
- </ul >
323
267
<h4 ><a name =" method_input_stream.read " ><code >[method]input-stream.read: func</code ></a ></h4 >
324
268
<p >Perform a non-blocking read from the stream.</p >
325
269
<p >This function returns a list of bytes containing the read data,
@@ -590,7 +534,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
590
534
<ul >
591
535
<li ><a name =" 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 >
592
536
</ul >
593
- <h2 ><a name =" wasi:cli_stdout " >Import interface wasi:cli/stdout</a ></h2 >
537
+ <h2 ><a name =" wasi:cli_stdout_0.2.0_rc_2023_11_10 " >Import interface wasi:cli/stdout@0.2.0-rc-2023-11-10 </a ></h2 >
594
538
<hr />
595
539
<h3 >Types</h3 >
596
540
<h4 ><a name =" output_stream " ><code >type output-stream</code ></a ></h4 >
@@ -603,7 +547,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
603
547
<ul >
604
548
<li ><a name =" get_stdout.0 " ></a > own< ; <a href =" #output_stream " ><a href =" #output_stream " ><code >output-stream</code ></a ></a >> ; </li >
605
549
</ul >
606
- <h2 ><a name =" wasi:cli_stderr " >Import interface wasi:cli/stderr</a ></h2 >
550
+ <h2 ><a name =" wasi:cli_stderr_0.2.0_rc_2023_11_10 " >Import interface wasi:cli/stderr@0.2.0-rc-2023-11-10 </a ></h2 >
607
551
<hr />
608
552
<h3 >Types</h3 >
609
553
<h4 ><a name =" output_stream " ><code >type output-stream</code ></a ></h4 >
@@ -616,7 +560,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
616
560
<ul >
617
561
<li ><a name =" get_stderr.0 " ></a > own< ; <a href =" #output_stream " ><a href =" #output_stream " ><code >output-stream</code ></a ></a >> ; </li >
618
562
</ul >
619
- <h2 ><a name =" wasi:cli_stdin " >Import interface wasi:cli/stdin</a ></h2 >
563
+ <h2 ><a name =" wasi:cli_stdin_0.2.0_rc_2023_11_10 " >Import interface wasi:cli/stdin@0.2.0-rc-2023-11-10 </a ></h2 >
620
564
<hr />
621
565
<h3 >Types</h3 >
622
566
<h4 ><a name =" input_stream " ><code >type input-stream</code ></a ></h4 >
@@ -629,7 +573,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
629
573
<ul >
630
574
<li ><a name =" get_stdin.0 " ></a > own< ; <a href =" #input_stream " ><a href =" #input_stream " ><code >input-stream</code ></a ></a >> ; </li >
631
575
</ul >
632
- <h2 ><a name =" wasi:http_types " >Import interface wasi:http/types</a ></h2 >
576
+ <h2 ><a name =" wasi:http_types_0.2.0_rc_2023_11_10 " >Import interface wasi:http/types@0.2.0-rc-2023-11-10 </a ></h2 >
633
577
<p >This interface defines all of the types and methods for implementing
634
578
HTTP Requests and Responses, both incoming and outgoing, as well as
635
579
their headers, trailers, and bodies.</p >
@@ -644,7 +588,7 @@ their headers, trailers, and bodies.</p>
644
588
#### <a name =" output_stream " >` type output-stream ` </a >
645
589
[ ` output-stream ` ] ( #output_stream )
646
590
<p >
647
- #### <a name =" stream_error " >` type stream -error ` </a >
591
+ #### <a name =" io_error " >` type io -error ` </a >
648
592
[ ` error ` ] ( #error )
649
593
<p >
650
594
#### <a name =" pollable " >` type pollable ` </a >
@@ -797,17 +741,18 @@ so they are provided as a list of bytes.
797
741
<hr />
798
742
<h3 >Functions</h3 >
799
743
<h4 ><a name =" http_error_code " ><code >http-error-code: func</code ></a ></h4 >
800
- <p >Attempts to extract a http-related <a href =" #error " ><code >error</code ></a > from the stream <a href =" #error " ><code >error</code ></a >
744
+ <p >Attempts to extract a http-related <a href =" #error " ><code >error</code ></a > from the wasi:io <a href =" #error " ><code >error</code ></a >
801
745
provided.</p >
802
- <p >Stream operations which return <a href =" #stream_error.last_operation_failed " ><code >stream-error::last-operation-failed</code ></a > have
803
- a payload with more information about the operation that failed. This
804
- payload can be passed through to this function to see if there's
805
- http-related information about the error to return.</p >
806
- <p >Note that this function is fallible because not all stream-related errors
807
- are http-related errors.</p >
746
+ <p >Stream operations which return
747
+ <code >wasi: io /stream/stream-error::last-operation-failed</code > have a payload of
748
+ type <code >wasi: io /error/error</code > with more information about the operation
749
+ that failed. This payload can be passed through to this function to see
750
+ if there's http-related information about the error to return.</p >
751
+ <p >Note that this function is fallible because not all io-errors are
752
+ http-related errors.</p >
808
753
<h5 >Params</h5 >
809
754
<ul >
810
- <li ><a name =" http_error_code.err " ><code >err</code ></a >: borrow< ; <a href =" #stream_error " ><a href =" #stream_error " ><code >stream -error</code ></a ></a >> ; </li >
755
+ <li ><a name =" http_error_code.err " ><code >err</code ></a >: borrow< ; <a href =" #io_error " ><a href =" #io_error " ><code >io -error</code ></a ></a >> ; </li >
811
756
</ul >
812
757
<h5 >Return values</h5 >
813
758
<ul >
@@ -1007,7 +952,7 @@ to reject invalid constructions of <a href="#outgoing_request"><code>outgoing-re
1007
952
<p >Returns the resource corresponding to the outgoing Body for this
1008
953
Request.</p >
1009
954
<p >Returns success on the first call: the <a href =" #outgoing_body " ><code >outgoing-body</code ></a > resource for
1010
- this <a href =" #outgoing_response " ><code >outgoing-response </code ></a > can be retrieved at most once. Subsequent
955
+ this <a href =" #outgoing_request " ><code >outgoing-request </code ></a > can be retrieved at most once. Subsequent
1011
956
calls will return error.</p >
1012
957
<h5 >Params</h5 >
1013
958
<ul >
@@ -1446,7 +1391,7 @@ but those will be reported by the <a href="#incoming_body"><code>incoming-body</
1446
1391
<ul >
1447
1392
<li ><a name =" 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 >
1448
1393
</ul >
1449
- <h2 ><a name =" wasi:http_outgoing_handler " >Import interface wasi:http/outgoing-handler</a ></h2 >
1394
+ <h2 ><a name =" wasi:http_outgoing_handler_0.2.0_rc_2023_11_10 " >Import interface wasi:http/outgoing-handler@0.2.0-rc-2023-11-10 </a ></h2 >
1450
1395
<p >This interface defines a handler of outgoing HTTP Requests. It should be
1451
1396
imported by components which wish to make HTTP Requests.</p >
1452
1397
<hr />
@@ -1483,7 +1428,7 @@ through the <a href="#future_incoming_response"><code>future-incoming-response</
1483
1428
<ul >
1484
1429
<li ><a name =" handle.0 " ></a > result< ; own< ; <a href =" #future_incoming_response " ><a href =" #future_incoming_response " ><code >future-incoming-response</code ></a ></a >> ; , <a href =" #error_code " ><a href =" #error_code " ><code >error-code</code ></a ></a >> ; </li >
1485
1430
</ul >
1486
- <h2 ><a name =" wasi:http_incoming_handler " >Export interface wasi:http/incoming-handler</a ></h2 >
1431
+ <h2 ><a name =" wasi:http_incoming_handler_0.2.0_rc_2023_11_10 " >Export interface wasi:http/incoming-handler@0.2.0-rc-2023-11-10 </a ></h2 >
1487
1432
<hr />
1488
1433
<h3 >Types</h3 >
1489
1434
<h4 ><a name =" incoming_request " ><code >type incoming-request</code ></a ></h4 >
0 commit comments