@bytecodealliance/preview2-shim 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.js +1 -3
- package/lib/common/io.js +150 -104
- package/lib/nodejs/cli.js +55 -6
- package/lib/nodejs/filesystem.js +247 -251
- package/lib/nodejs/http.js +2 -2
- package/lib/nodejs/index.js +1 -3
- package/package.json +5 -1
- package/types/interfaces/wasi-cli-terminal-input.d.ts +0 -11
- package/types/interfaces/wasi-cli-terminal-output.d.ts +0 -11
- package/types/interfaces/wasi-clocks-monotonic-clock.d.ts +1 -1
- package/types/interfaces/wasi-clocks-timezone.d.ts +2 -17
- package/types/interfaces/wasi-filesystem-types.d.ts +75 -67
- package/types/interfaces/wasi-io-poll.d.ts +30 -0
- package/types/interfaces/wasi-io-streams.d.ts +123 -143
- package/types/interfaces/wasi-random-random.d.ts +13 -11
- package/types/interfaces/wasi-sockets-ip-name-lookup.d.ts +10 -14
- package/types/interfaces/wasi-sockets-network.d.ts +15 -57
- package/types/interfaces/wasi-sockets-tcp-create-socket.d.ts +2 -3
- package/types/interfaces/wasi-sockets-tcp.d.ts +91 -93
- package/types/interfaces/wasi-sockets-udp-create-socket.d.ts +2 -3
- package/types/interfaces/wasi-sockets-udp.d.ts +49 -56
- package/types/wasi-cli-command.d.ts +1 -1
- package/lib/browser/logging.js +0 -14
- package/lib/nodejs/io.js +0 -16
- package/lib/nodejs/logging.js +0 -14
- package/types/interfaces/wasi-poll-poll.d.ts +0 -39
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export namespace WasiPollPoll {
|
|
2
|
-
/**
|
|
3
|
-
* Dispose of the specified `pollable`, after which it may no longer
|
|
4
|
-
* be used.
|
|
5
|
-
*/
|
|
6
|
-
export function dropPollable(this_: Pollable): void;
|
|
7
|
-
/**
|
|
8
|
-
* Poll for completion on a set of pollables.
|
|
9
|
-
*
|
|
10
|
-
* The "oneoff" in the name refers to the fact that this function must do a
|
|
11
|
-
* linear scan through the entire list of subscriptions, which may be
|
|
12
|
-
* inefficient if the number is large and the same subscriptions are used
|
|
13
|
-
* many times. In the future, this is expected to be obsoleted by the
|
|
14
|
-
* component model async proposal, which will include a scalable waiting
|
|
15
|
-
* facility.
|
|
16
|
-
*
|
|
17
|
-
* The result list<bool> is the same length as the argument
|
|
18
|
-
* list<pollable>, and indicates the readiness of each corresponding
|
|
19
|
-
* element in that / list, with true indicating ready.
|
|
20
|
-
*/
|
|
21
|
-
export function pollOneoff(in_: Uint32Array): boolean[];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* A "pollable" handle.
|
|
25
|
-
*
|
|
26
|
-
* This is conceptually represents a `stream<_, _>`, or in other words,
|
|
27
|
-
* a stream that one can wait on, repeatedly, but which does not itself
|
|
28
|
-
* produce any data. It's temporary scaffolding until component-model's
|
|
29
|
-
* async features are ready.
|
|
30
|
-
*
|
|
31
|
-
* And at present, it is a `u32` instead of being an actual handle, until
|
|
32
|
-
* the wit-bindgen implementation of handles and resources is ready.
|
|
33
|
-
*
|
|
34
|
-
* `pollable` lifetimes are not automatically managed. Users must ensure
|
|
35
|
-
* that they do not outlive the resource they reference.
|
|
36
|
-
*
|
|
37
|
-
* This [represents a resource](https://github.com/WebAssembly/WASI/blob/main/docs/WitInWasi.md#Resources).
|
|
38
|
-
*/
|
|
39
|
-
export type Pollable = number;
|