kobako 0.30.0-aarch64-linux → 0.32.0-aarch64-linux
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.
- checksums.yaml +4 -4
- data/.githooks/linux-tests.sh +29 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +460 -0
- data/README.md +43 -4
- data/ROADMAP.md +1 -2
- data/crates/kobako-runtime/CHANGELOG.md +309 -0
- data/crates/kobako-runtime/README.md +7 -4
- data/crates/kobako-transport/CHANGELOG.md +38 -0
- data/crates/kobako-transport/README.md +3 -4
- data/crates/kobako-wasmtime/CHANGELOG.md +208 -0
- data/crates/kobako-wasmtime/README.md +4 -3
- data/crates/kobako-wasmtime/wit/deps/cli.wit +233 -0
- data/crates/kobako-wasmtime/wit/deps/clocks.wit +162 -0
- data/crates/kobako-wasmtime/wit/deps/filesystem.wit +589 -0
- data/crates/kobako-wasmtime/wit/deps/http.wit +733 -0
- data/crates/kobako-wasmtime/wit/deps/io.wit +299 -0
- data/crates/kobako-wasmtime/wit/deps/random.wit +92 -0
- data/crates/kobako-wasmtime/wit/deps/sockets.wit +949 -0
- data/crates/kobako-wasmtime/witx/wasi_snapshot_preview1.witx +13 -0
- data/data/kobako.wasm +0 -0
- data/lib/kobako/3.3/kobako.so +0 -0
- data/lib/kobako/3.4/kobako.so +0 -0
- data/lib/kobako/4.0/kobako.so +0 -0
- data/lib/kobako/catalog/extensions.rb +14 -2
- data/lib/kobako/catalog/flags.rb +3 -5
- data/lib/kobako/catalog/grants.rb +5 -4
- data/lib/kobako/catalog/handles.rb +14 -32
- data/lib/kobako/catalog/mount.rb +11 -3
- data/lib/kobako/catalog/network.rb +35 -0
- data/lib/kobako/catalog/replacements.rb +28 -0
- data/lib/kobako/catalog/services.rb +5 -19
- data/lib/kobako/catalog/snippets.rb +3 -18
- data/lib/kobako/catalog.rb +3 -0
- data/lib/kobako/codec/{utils.rb → boundary.rb} +4 -2
- data/lib/kobako/codec/decoder.rb +5 -5
- data/lib/kobako/codec/ext_types.rb +3 -3
- data/lib/kobako/codec/handle_walk.rb +3 -43
- data/lib/kobako/codec/state.rb +2 -18
- data/lib/kobako/codec/value_budget.rb +133 -41
- data/lib/kobako/codec.rb +6 -7
- data/lib/kobako/context.rb +24 -11
- data/lib/kobako/errors.rb +18 -18
- data/lib/kobako/extension.rb +3 -2
- data/lib/kobako/filesystem.rb +10 -3
- data/lib/kobako/fork.rb +42 -0
- data/lib/kobako/handle.rb +2 -3
- data/lib/kobako/names.rb +28 -0
- data/lib/kobako/network.rb +210 -0
- data/lib/kobako/outcome.rb +7 -7
- data/lib/kobako/runtime.rb +3 -2
- data/lib/kobako/sandbox.rb +73 -35
- data/lib/kobako/sandbox_options.rb +42 -109
- data/lib/kobako/transport/argument_wrap.rb +64 -0
- data/lib/kobako/transport/block_failure.rb +1 -1
- data/lib/kobako/transport/dispatcher.rb +6 -6
- data/lib/kobako/transport/exposure.rb +26 -15
- data/lib/kobako/transport/reflection.rb +21 -4
- data/lib/kobako/transport/run.rb +8 -23
- data/lib/kobako/transport/yielder.rb +2 -9
- data/lib/kobako/transport.rb +1 -0
- data/lib/kobako/usage.rb +4 -2
- data/lib/kobako/version.rb +1 -1
- data/lib/kobako.rb +8 -4
- data/release-please-config.json +15 -0
- data/sig/kobako/catalog/extensions.rbs +2 -0
- data/sig/kobako/catalog/grants.rbs +7 -4
- data/sig/kobako/catalog/handles.rbs +2 -2
- data/sig/kobako/catalog/mount.rbs +3 -1
- data/sig/kobako/catalog/network.rbs +20 -0
- data/sig/kobako/catalog/replacements.rbs +14 -0
- data/sig/kobako/catalog/services.rbs +0 -4
- data/sig/kobako/catalog/snippets.rbs +0 -2
- data/sig/kobako/codec/{utils.rbs → boundary.rbs} +2 -2
- data/sig/kobako/codec/handle_walk.rbs +0 -6
- data/sig/kobako/codec/state.rbs +0 -4
- data/sig/kobako/codec/value_budget.rbs +48 -5
- data/sig/kobako/codec.rbs +2 -2
- data/sig/kobako/context.rbs +3 -1
- data/sig/kobako/errors.rbs +4 -7
- data/sig/kobako/filesystem.rbs +21 -3
- data/sig/kobako/fork.rbs +17 -0
- data/sig/kobako/network.rbs +115 -0
- data/sig/kobako/outcome.rbs +1 -1
- data/sig/kobako/runtime.rbs +32 -3
- data/sig/kobako/sandbox.rbs +10 -2
- data/sig/kobako/sandbox_options.rbs +29 -40
- data/sig/kobako/transport/argument_wrap.rbs +15 -0
- data/sig/kobako/transport/error.rbs +1 -1
- data/sig/kobako/transport/exposure.rbs +2 -4
- data/sig/kobako/transport/reflection.rbs +10 -0
- data/sig/kobako/transport/run.rbs +0 -2
- data/sig/kobako/transport/yielder.rbs +0 -3
- data/sig/kobako/transport.rbs +1 -1
- data/sig/kobako.rbs +13 -0
- metadata +25 -11
- data/crates/kobako-runtime/tests/linux_baseline/linux-baseline-expected.txt +0 -16
- data/lib/kobako/constant_name.rb +0 -8
- data/lib/kobako/pool.rb +0 -140
- data/sig/kobako/constant_name.rbs +0 -3
- data/sig/kobako/pool.rbs +0 -42
|
@@ -1,5 +1,213 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.22.0](https://github.com/elct9620/kobako/compare/kobako-wasmtime-v0.21.0...kobako-wasmtime-v0.22.0) (2026-11-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **runtime:** vfs::cp_new_stat returns Result<Kstat, Errno> and vfs::ino_of returns Result<u64, Errno> in place of Kstat and u64; a Wasm Driver passes their EOVERFLOW to the guest.
|
|
9
|
+
* **wasmtime:** a guest no longer reads EINTR from a call its run's deadline or interrupt ended; the run ends there as a timeout or an interrupt.
|
|
10
|
+
* **runtime:** memory_limit measures the guest's own memory only; host buffers no longer answer ENOMEM or fail a request as internal.
|
|
11
|
+
* **memcg:** a run whose start function, global initializers, table growth, or request grow past memory_limit now raises Kobako::MemoryLimitError, growth of several memories and the GC heap adds up, and Usage#memory_peak includes them. Raise memory_limit by that growth to keep the earlier headroom.
|
|
12
|
+
* **filesystem:** an Overlay directory over N Bind Layers takes N of an invocation's `open_file_limit`; raise the limit by the Layers each held directory spans.
|
|
13
|
+
* **net:** TcpSock::send_room counts the Invocation's memory, and MemoryBudget::peak, and so Usage::memory_peak, can pass the limit by a permitted write as well as a forced read, at most 68 KiB more per open connection.
|
|
14
|
+
* **vfs:** a FileOperations implementing iterate_shared must also return true from has_iterate_shared, or its listings answer NotADirectory.
|
|
15
|
+
* **vfs:** a guest now holds one preopen, `/`, at descriptor 3, instead of one per outermost Mount named by its path. A Guest Binary built on wasi-libc is unaffected; one that reads a Mount through descriptor 3 directly walks from `/` now, or the Host App mounts its Filesystem at `/`. `kobako_runtime::mount::outermost_of` is removed; a Wasm Driver opens `Cred::root` instead.
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **http:** stream a request body as the guest writes it ([ed2b571](https://github.com/elct9620/kobako/commit/ed2b571820d46b1fdfff577b3c8257fd7c63ce71))
|
|
20
|
+
* **runtime:** tell how many datagrams a UDP socket holds unread ([48df527](https://github.com/elct9620/kobako/commit/48df52794238e2c13e27cc45f78e31e24101d82e))
|
|
21
|
+
* **vfs:** preopen the guest's root alone, beneath which every Mount stands ([2a6d18d](https://github.com/elct9620/kobako/commit/2a6d18d78814f0529b15e109bbcd50f8b372e51b))
|
|
22
|
+
* **wasmtime:** bound what one host call copies out of the guest by memory_limit ([044090e](https://github.com/elct9620/kobako/commit/044090eef9430584d970b0bd0a773fd37ce61ffc))
|
|
23
|
+
* **wasmtime:** let a forked child on macOS run Sandboxes on any Thread ([a78375a](https://github.com/elct9620/kobako/commit/a78375a440614eb14dee722365702bb3bab5a23c))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **filesystem:** charge each host directory an Overlay holds to the caller ([437ada0](https://github.com/elct9620/kobako/commit/437ada00b268cf793cee8e7fadee1067dd0a4bf7))
|
|
29
|
+
* **memcg:** charge every growth from the run's Store past what the binary declares ([44c7a8b](https://github.com/elct9620/kobako/commit/44c7a8bdc444b96a5d34a137a72b4e2f3c292d80))
|
|
30
|
+
* **net:** keep an output stream's permit whole once its memory fills ([2b641cc](https://github.com/elct9620/kobako/commit/2b641ccee300a160d39c5edf691487d05ac4e365))
|
|
31
|
+
* **net:** move each request on the thread that waits for it ([425f82a](https://github.com/elct9620/kobako/commit/425f82abc5fc0b78774d0ae4e448a13a547bac29))
|
|
32
|
+
* **runtime:** count only the guest's descriptors against the open-file cap ([b0deca2](https://github.com/elct9620/kobako/commit/b0deca26519684729f37bf288a6a40f28968f9d0))
|
|
33
|
+
* **runtime:** hold what the host keeps for a run by counts, not memory ([5428293](https://github.com/elct9620/kobako/commit/54282932e5f8a523d3d9e79275b846265102a22f))
|
|
34
|
+
* **runtime:** number a hermetic invocation's entries in the order it meets them ([4e23399](https://github.com/elct9620/kobako/commit/4e23399eca979ae4526735c72e34133907dceeb3))
|
|
35
|
+
* **vfs:** keep each Filesystem's moves to the walks on it ([42062b9](https://github.com/elct9620/kobako/commit/42062b9c2f22e00f6317fa92ebd6abe2b3fd76b0))
|
|
36
|
+
* **vfs:** refuse a listing of a file without iterate_shared before locking it ([34eb327](https://github.com/elct9620/kobako/commit/34eb3273cd537ccbd2b7a3592ece38da79d60d2f))
|
|
37
|
+
* **wasmtime:** answer random_get a page at a time into the guest's buffer ([d55aa1d](https://github.com/elct9620/kobako/commit/d55aa1da4082902e3b3f6b664b64ac50ee25d9b0))
|
|
38
|
+
* **wasmtime:** ask the OS for a permissive guest's entropy on each draw ([fcfaca4](https://github.com/elct9620/kobako/commit/fcfaca49d0067d1d372e24e680004d04cd0f41ee))
|
|
39
|
+
* **wasmtime:** end a run as a host call returns once the run is to stop ([f5840c6](https://github.com/elct9620/kobako/commit/f5840c687f91d18fb01bb426d577f9c4e208b277))
|
|
40
|
+
* **wasmtime:** fail a refused growth as memory.grow does, not by ending the run ([8cd50be](https://github.com/elct9620/kobako/commit/8cd50bed12c18ea0b906b3e2fe1d6310194e34f2))
|
|
41
|
+
* **wasmtime:** fail the caller when the host has no thread or room ([855734f](https://github.com/elct9620/kobako/commit/855734fcaf97cae11e80a6e9f83492bc2c292a2b))
|
|
42
|
+
* **wasmtime:** open a cached artifact on Windows as wasmtime maps one ([4be7e9b](https://github.com/elct9620/kobako/commit/4be7e9b8b371f3dc95490da024ca72fa1a0c7597))
|
|
43
|
+
* **wasmtime:** stop a guest that only computes once its run takes a fatal signal ([32990b6](https://github.com/elct9620/kobako/commit/32990b63cd6ae16c5d8a0e473a218d46d29c8919))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Performance Improvements
|
|
47
|
+
|
|
48
|
+
* **wasmtime:** cache compiled Guest Binaries on disk on Windows too ([76ca86e](https://github.com/elct9620/kobako/commit/76ca86e3aab83d239e1d0b4ebbcd21e2aec14bf3))
|
|
49
|
+
|
|
50
|
+
## [0.21.0](https://github.com/elct9620/kobako/compare/kobako-wasmtime-v0.20.0...kobako-wasmtime-v0.21.0) (2026-11-18)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### ⚠ BREAKING CHANGES
|
|
54
|
+
|
|
55
|
+
* **transport:** kobako_transport::envelope::Reply is CallReply.
|
|
56
|
+
* **transport:** call Driver::from_file in place of Driver::new;
|
|
57
|
+
* **security:** call kobako_runtime::security::prepare_creds in place of prepare_creds_within.
|
|
58
|
+
* **vfs:** call Rdir::iterate_shared and File::is_readable, is_writable, is_append, is_nonblock, is_dsync, and is_sync in place of the bare names.
|
|
59
|
+
* **vfs:** call Iattr::for_size, Iattr::for_times, Kiocb::new, and get_anon_bdev in place of Iattr::size, Iattr::times, Kiocb::at, and
|
|
60
|
+
* **vfs:** call Inode::file_type and File::file_type in place of kind.
|
|
61
|
+
* **runtime:** match SetupError::GuestBinaryNotFound in place of
|
|
62
|
+
* **network:** open_connection_limit bounds what one invocation holds open at once, not what all of a Sandbox's invocations hold together.
|
|
63
|
+
* **transport:** a Guest Binary built against ABI 5 is refused at construction. Rebuild it against kobako-core, whose export_guest! emits the new names. kobako-transport drops ABI_VERSION as a u32, FRAME_LEN_SIZE, MAX_FRAME_LEN, pack_ptr_len, and unpack_ptr_len, and names the ABI through ABI_VERSION ("0.6.0"), GUEST_INTERFACE, HOST_INTERFACE, DOWNCALL, UPCALL, and PREAMBLE. kobako-core drops alloc; answer returns the return area's address.
|
|
64
|
+
* **sdk:** `kobako::Options` and `kobako_wasmtime::Config` read and set every cap through `limits`: write `options.limits.timeout = …` where `options.timeout = …` was written, and likewise for `setup_timeout`, `memory_limit`, `stdout_limit`, `stderr_limit`, `open_file_limit`, `open_connection_limit`, and `connection_limit`.
|
|
65
|
+
* **options:** SandboxOptions no longer defines the DEFAULT_* constants, and SandboxOptions.new requires every option; a Sandbox's defaults are unchanged and readable through Sandbox#options.
|
|
66
|
+
* **runtime:** `memory_limit` now bounds the guest's `memory.grow` and what the host holds for the run together, where a Filesystem written in Ruby had its directory listings counted against a limit of their own. A run that grew close to `memory_limit` and listed a large directory may now raise `Errno::ENOMEM` in the guest or `Kobako::MemoryLimitError`, and `Usage#memory_peak` includes the listings. Raise `memory_limit` by what those listings hold to keep the earlier headroom.
|
|
67
|
+
* **runtime:** `kobako_runtime::FilesystemError`, `kobako_runtime::vfs::FilesystemError`, and `kobako_runtime::filesystem::FilesystemError` are now `kobako_runtime::Errno`, also reachable as `kobako::Errno`. Rename the type in a Filesystem or security module; its variants are unchanged.
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
|
|
71
|
+
* bound a guest's connections per Sandbox, per run, and per process ([7a4f869](https://github.com/elct9620/kobako/commit/7a4f8692cbc788a23c582b90112cd0275739d496))
|
|
72
|
+
* **io:** match patterns and change the working directory through Dir ([72cca2c](https://github.com/elct9620/kobako/commit/72cca2c400c20f6cb52d7fb0e4589fd366bf0878))
|
|
73
|
+
* **network:** route and refuse a Mock's dials by protocol, UDP included ([9e8b44d](https://github.com/elct9620/kobako/commit/9e8b44d425db205fe0bb2faccca0782acf1e1b4e))
|
|
74
|
+
* **runtime:** answer the guest's network from a table a test writes ([b3aba65](https://github.com/elct9620/kobako/commit/b3aba650760b8cff3113341500fa414b17f4dd76))
|
|
75
|
+
* **runtime:** make a Filesystem from its kind without wrapping it first ([e7eb8a0](https://github.com/elct9620/kobako/commit/e7eb8a00a37794226edce2aa7f1bdcab2ef6790b))
|
|
76
|
+
* **transport:** carry the Guest ABI in the Canonical ABI's core shape ([34b9560](https://github.com/elct9620/kobako/commit/34b956001a05e15fe29febd7098b2ceb054e1bab))
|
|
77
|
+
* **wasmtime:** answer a TCP socket's keep-alive-enabled from the socket ([0a78137](https://github.com/elct9620/kobako/commit/0a781371651f05196179c2c92cc22f6191e68062))
|
|
78
|
+
* **wasmtime:** answer a TCP socket's keepalive timing and buffer sizes ([5b248a3](https://github.com/elct9620/kobako/commit/5b248a3a58c7422c21e8a7bd31cb4f264ab5c3b6))
|
|
79
|
+
* **wasmtime:** answer hop limits and a UDP socket's buffer sizes ([3cf0a71](https://github.com/elct9620/kobako/commit/3cf0a71c28acfc2ac4cb7928f3e73b31b924fa90))
|
|
80
|
+
* **wasmtime:** answer wasi:sockets/udp with one peer a guest names ([e15500d](https://github.com/elct9620/kobako/commit/e15500d6268bb4b31c11367048731a64eaf91577))
|
|
81
|
+
* **wasmtime:** read the host's trust store as a Driver is built ([119ede5](https://github.com/elct9620/kobako/commit/119ede5439bb8c12523ef3607a64ee67cd45532d))
|
|
82
|
+
* **wasmtime:** stand the standard streams over preview2 streams ([768ba2b](https://github.com/elct9620/kobako/commit/768ba2b608e09915b3399108ffcca0d163004177))
|
|
83
|
+
* **wasmtime:** take the network's Protocol Family and Resolver from Config ([56cc53f](https://github.com/elct9620/kobako/commit/56cc53fa56cd987666f6b18b16e5264e314d8ef8))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Bug Fixes
|
|
87
|
+
|
|
88
|
+
* answer an oversized datagram EMSGSIZE from the socket itself ([02317bc](https://github.com/elct9620/kobako/commit/02317bcc8e1ef86aa4b4a5e7a3b63b297cb6aeab))
|
|
89
|
+
* bound a guest's header list by size and charge it to its memory ([80c9ee2](https://github.com/elct9620/kobako/commit/80c9ee2523e0a3ad5de78e769a45136bcbcb6dc8))
|
|
90
|
+
* **core:** take no room for an empty list the host lowers ([f2fac23](https://github.com/elct9620/kobako/commit/f2fac236de645f69e479fa5bff97979005e344eb))
|
|
91
|
+
* **http:** answer a request whose name has no address with DNS-error ([295fe03](https://github.com/elct9620/kobako/commit/295fe036232e9256b2b3ce49f46168a51ce3f7e2))
|
|
92
|
+
* **http:** refuse an outgoing body finished with trailers ([c3c8f1b](https://github.com/elct9620/kobako/commit/c3c8f1b3b6277865f119c04065109a8cb4e1ab76))
|
|
93
|
+
* **http:** send the trailers an outgoing body finishes with ([7792bcc](https://github.com/elct9620/kobako/commit/7792bccbedff4758b2ec85bae344c45769997518))
|
|
94
|
+
* **io:** answer a script's socket addr at the guest's own virtual address ([6e8891a](https://github.com/elct9620/kobako/commit/6e8891a9b242849f1d1d9cea825ab47480b69b0e))
|
|
95
|
+
* **io:** answer each stream call with its own error, as CRuby's ([9f54696](https://github.com/elct9620/kobako/commit/9f54696635a4a0026c2555fcc6d0b6ab64b266e4))
|
|
96
|
+
* **io:** convert a number a file or socket call takes through to_int ([3da8767](https://github.com/elct9620/kobako/commit/3da8767e53b6c5d759b5a891357c6a3fe50ba01b))
|
|
97
|
+
* **io:** let the host judge a script's bind, as CRuby names it ([0ec0f80](https://github.com/elct9620/kobako/commit/0ec0f805b8a0c6caed0e4c7c25dd99c5cdaffd07))
|
|
98
|
+
* **io:** name every errno as CRuby does and build SystemCallError as it does ([487fcb6](https://github.com/elct9620/kobako/commit/487fcb67affc89b445296b6f482cec791f438ccd))
|
|
99
|
+
* **io:** raise Errno::ENFILE for a host out of open files in system ([894f8b2](https://github.com/elct9620/kobako/commit/894f8b253d29db6bddad205be45a94327e35f2e5))
|
|
100
|
+
* **io:** read a file's mode, names, lines, and seeks as CRuby does ([aeb0125](https://github.com/elct9620/kobako/commit/aeb01252708fecab8d5ed968866ca1b368670f0b))
|
|
101
|
+
* **io:** read a Float count or length the one way CRuby's NUM2LONG does ([794a529](https://github.com/elct9620/kobako/commit/794a529f3f9664f444d9c15e25964979daed429b))
|
|
102
|
+
* **io:** read a Float whence as the Integer it truncates to ([5386576](https://github.com/elct9620/kobako/commit/5386576297a76be3c14cc8ce87d1640cab75346e))
|
|
103
|
+
* **io:** read a socket stream's failure through network-error-code ([01761e1](https://github.com/elct9620/kobako/commit/01761e12d1e12484253611bb5ac2136ebff070f2))
|
|
104
|
+
* **io:** refuse a seek whence past C's int as CRuby's NUM2INT does ([972e3c8](https://github.com/elct9620/kobako/commit/972e3c8481eb6436b64da121dc21ad4555db933f))
|
|
105
|
+
* **io:** seek, putc, warn, and an unknown errno answer as CRuby's do ([86f8bff](https://github.com/elct9620/kobako/commit/86f8bffe826a01785edbdf6df142ae9353f30bac))
|
|
106
|
+
* judge a request's authority, path, and headers as wasmtime does ([903cc7b](https://github.com/elct9620/kobako/commit/903cc7b39217f3038de6bab5981ea37499f25e1c))
|
|
107
|
+
* make each guest socket and its file at creation, as socket() does ([fca4311](https://github.com/elct9620/kobako/commit/fca4311060be90df2ec79c1d21bb3a9a5b0b36ca))
|
|
108
|
+
* **net:** answer a host down by its own name until a WASI code groups it ([1ec6001](https://github.com/elct9620/kobako/commit/1ec60013934486bf54fe2fa2e6fb6785009d4af1))
|
|
109
|
+
* **net:** answer a host socket's errno as wasmtime-wasi does on every host ([293ea2c](https://github.com/elct9620/kobako/commit/293ea2cccabc6d63840e199e796af419e2687658))
|
|
110
|
+
* **net:** answer an IPv4-mapped address's lookup with its IPv4 address ([99f67c5](https://github.com/elct9620/kobako/commit/99f67c5da05bcc5d08222c8e505353475b68a93d))
|
|
111
|
+
* **net:** answer an unreachable request and a TLS alert as wasmtime-wasi-http does ([06bb9f9](https://github.com/elct9620/kobako/commit/06bb9f91c98bdb897853fc9fe0571ee20a6ee60d))
|
|
112
|
+
* **net:** answer EAGAIN on a shut UDP read, as non-blocking Linux does ([675376d](https://github.com/elct9620/kobako/commit/675376d971c721ca23a5bd581e7d83db59dc94aa))
|
|
113
|
+
* **net:** answer preview2 permits, options, and schemes as wasmtime-wasi ([3489166](https://github.com/elct9620/kobako/commit/3489166945852ca53626b82510f5c0a728cf0b26))
|
|
114
|
+
* **net:** bound an HTTP request by the timeouts request-options sets ([b0e35d8](https://github.com/elct9620/kobako/commit/b0e35d80a275ecb33679ff1967e05f476f155ce7))
|
|
115
|
+
* **net:** cancel a name lookup nobody waits for ([bf8c668](https://github.com/elct9620/kobako/commit/bf8c6682055f8993060de7c79c2d4af51a0bd111))
|
|
116
|
+
* **net:** deny a socket without a network as wasmtime-wasi does ([09b0e9a](https://github.com/elct9620/kobako/commit/09b0e9a2713bd76ab0aafeaa5d459566891154e6))
|
|
117
|
+
* **net:** hold a request's parts against memory while it is sent ([d1b642b](https://github.com/elct9620/kobako/commit/d1b642b1171d54b4c0d4cbc1ae6e8ff313b3dc89))
|
|
118
|
+
* **net:** hold a request's parts and a response's head against memory ([fbc93c5](https://github.com/elct9620/kobako/commit/fbc93c5d763396cb5b928801380ef3989ec931af))
|
|
119
|
+
* **net:** name a host socket's failure from its errno where std names none ([dddffa4](https://github.com/elct9620/kobako/commit/dddffa4bdc22575e3af4b27809662b04127aafc6))
|
|
120
|
+
* **net:** read a host the guest names as wasmtime-wasi's lookup does ([2defe86](https://github.com/elct9620/kobako/commit/2defe8666e9046179dab4ff8b74057e69c9ab10a))
|
|
121
|
+
* **net:** start a TCP socket's send buffer at Linux's default until it connects ([ea560c8](https://github.com/elct9620/kobako/commit/ea560c8ecdb0af143f94581ed10147bdc3e0359a))
|
|
122
|
+
* **net:** wait on a socket by its own flag, and reset a released one sent to ([9dbac06](https://github.com/elct9620/kobako/commit/9dbac065500e78c84a2ae000f06064f6f21b17f1))
|
|
123
|
+
* **network:** answer an endpoint the ruleset refuses as the Host App's argument ([1c6d710](https://github.com/elct9620/kobako/commit/1c6d710855495f874761eef1933f51c93a7a62b0))
|
|
124
|
+
* **network:** count each invocation's open connections apart ([dc426f6](https://github.com/elct9620/kobako/commit/dc426f60595b2df4ff508e7534ae37b7afed502c))
|
|
125
|
+
* **network:** read a Mock's names with the URL host parser ([a170e19](https://github.com/elct9620/kobako/commit/a170e197a85a1f7ca1dd6d00d62cb7dfa33b39b7))
|
|
126
|
+
* **network:** read a socket's own end at a virtual port, not the host's ([1ef8486](https://github.com/elct9620/kobako/commit/1ef84864b6f8106e25eaa5fd0abf7310d56835c6))
|
|
127
|
+
* **network:** refuse a Mock's dial with an errno that reads alike on every host ([3a7b705](https://github.com/elct9620/kobako/commit/3a7b705d82b195b4de1c54bc56fd04464dadba11))
|
|
128
|
+
* **network:** refuse a request whose method is not a token before any policy ([23a8e75](https://github.com/elct9620/kobako/commit/23a8e75d573b14610bdb048a0a3600017be0d69a))
|
|
129
|
+
* **runtime:** charge empty datagrams and virtual addresses ([9a4d9ba](https://github.com/elct9620/kobako/commit/9a4d9ba92cbd3ba5f7570f1693282202db43b6d9))
|
|
130
|
+
* **runtime:** charge the guest's growth and host-held memory to one budget ([f19659e](https://github.com/elct9620/kobako/commit/f19659ed93d0f5b0c1472dbc3bdbbb6815efbb4f))
|
|
131
|
+
* **runtime:** give a socket its virtual port as Linux's inet layer does ([2c80c02](https://github.com/elct9620/kobako/commit/2c80c027801b5a00501fb8141e8ebde53879a855))
|
|
132
|
+
* **runtime:** give each Invocation's outbound seam its own TLS sessions ([75119d8](https://github.com/elct9620/kobako/commit/75119d88a49f546a2d827a9476c5067d99bc02dd))
|
|
133
|
+
* **runtime:** give each real address its own virtual address and dial one destination ([71c1b8d](https://github.com/elct9620/kobako/commit/71c1b8d7c3ee5ee34f57e5f1a48b43619176d129))
|
|
134
|
+
* **runtime:** hold a socket's buffers against the Invocation's memory ([5d629a7](https://github.com/elct9620/kobako/commit/5d629a71f1940222dac36a57502030025575ef70))
|
|
135
|
+
* **runtime:** judge the guest's HTTP headers, binds, and peerless streams in the runtime ([bc3e024](https://github.com/elct9620/kobako/commit/bc3e024483e43d8b121cb67e661e06e99997f604))
|
|
136
|
+
* **runtime:** judge the request target the server reads ([9bc185e](https://github.com/elct9620/kobako/commit/9bc185e6f00375498f4d9119a34357e32d52279b))
|
|
137
|
+
* **runtime:** keep a deadline in a forked child with a ticker of its own ([030a3fa](https://github.com/elct9620/kobako/commit/030a3fa9360b93c0fcee4ba77c2f110ddf8d4b13))
|
|
138
|
+
* **runtime:** keep a failed growth in the memory peak ([2e2b986](https://github.com/elct9620/kobako/commit/2e2b986dfa47aff61f0c20ad9b63178bfccbd441))
|
|
139
|
+
* **runtime:** let an HTTP exchange go once nothing holds it ([2d78df9](https://github.com/elct9620/kobako/commit/2d78df98d11cdd8671629b1da2a5ac4b0b1862e7))
|
|
140
|
+
* **runtime:** name a host out of quota, links, or a busy program as Linux does ([6f5f816](https://github.com/elct9620/kobako/commit/6f5f816a6192dec2ea21c219a3a2f2497a6b2aac))
|
|
141
|
+
* **runtime:** refuse a second connect on a connecting or connected socket ([2949d40](https://github.com/elct9620/kobako/commit/2949d402303e11af2b4346a866fee754e1e00dbd))
|
|
142
|
+
* **runtime:** take the reactor before a TCP socket dials ([e056522](https://github.com/elct9620/kobako/commit/e0565227c357d05bca12610cd26d4aaac85b604a))
|
|
143
|
+
* **security:** make no Cred for a Mount that stands nowhere ([c2c6190](https://github.com/elct9620/kobako/commit/c2c619095eb452d19be1aab65941b7cb86b339dd))
|
|
144
|
+
* **vfs:** fail the run when a nested mount stands nowhere ([b6e44fa](https://github.com/elct9620/kobako/commit/b6e44fa43723831b2c7d37c64bbfea95f2086b83))
|
|
145
|
+
* **vfs:** place each mount as Linux's mount does, and open its preopen there ([a750bc7](https://github.com/elct9620/kobako/commit/a750bc75b3f1e8bcaf62ecaca1227fc0c92914c4))
|
|
146
|
+
* **vfs:** preopen only the outermost mounts and place the rest as Linux does ([7d21f34](https://github.com/elct9620/kobako/commit/7d21f348ab237497f4a509e464563f6c472a8a17))
|
|
147
|
+
* **wasmtime:** answer a connect, a short write, and a datagram's sender as wasmtime-wasi ([d1762d0](https://github.com/elct9620/kobako/commit/d1762d0a6f703c003cdb8bf00c81628f61ce2b6f))
|
|
148
|
+
* **wasmtime:** answer a file's preview1 calls on a socket's number as Linux does ([0ba90a0](https://github.com/elct9620/kobako/commit/0ba90a0b3369065865d6d1b5d3387217f5f37ca2))
|
|
149
|
+
* **wasmtime:** answer a lookup or request past the file limit ([82d9f34](https://github.com/elct9620/kobako/commit/82d9f344a1a322d3b3bb811a8bbf39b4f98ad21f))
|
|
150
|
+
* **wasmtime:** answer a socket's edges as wasmtime-wasi does ([2b80a61](https://github.com/elct9620/kobako/commit/2b80a61876c9eef18d8100df46b05033825b5b58))
|
|
151
|
+
* **wasmtime:** answer closed to a blocking flush of nothing once the send side shut ([284d5a0](https://github.com/elct9620/kobako/commit/284d5a0ba7d30ba022d27ba60ed6cc2d4fb0a3c9))
|
|
152
|
+
* **wasmtime:** answer new-socket-limit for a socket past the open file limit ([e45c8e8](https://github.com/elct9620/kobako/commit/e45c8e8a86003c47f69e251f0e87a77764ed2fa9))
|
|
153
|
+
* **wasmtime:** answer OVERFLOW for a file time a preview1 timestamp cannot hold ([a716dbf](https://github.com/elct9620/kobako/commit/a716dbf2152dc83945cdeaafc638c6f504fd3491))
|
|
154
|
+
* **wasmtime:** answer preview1 reads, writes, and polls on a socket's number ([5514429](https://github.com/elct9620/kobako/commit/5514429067d83e6f5775bff21a1f8ac09b70eff6))
|
|
155
|
+
* **wasmtime:** answer the non-blocking stream calls a guest bounds its waits with ([16ef908](https://github.com/elct9620/kobako/commit/16ef908947f5c94a37ee0f5370038936b2052e4a))
|
|
156
|
+
* **wasmtime:** answer the socket and stream edges as wasmtime answers them ([4f690ea](https://github.com/elct9620/kobako/commit/4f690ea29f45451982dee726c42dd178dc4ae880))
|
|
157
|
+
* **wasmtime:** answer three preview2 socket and stream steps as wasmtime-wasi ([702addd](https://github.com/elct9620/kobako/commit/702adddb0a2626117303bcfcc9d80eb4f0bf938e))
|
|
158
|
+
* **wasmtime:** answer three socket calls as wasmtime-wasi does ([e0b8c8b](https://github.com/elct9620/kobako/commit/e0b8c8b45d1b2e7b7152b6332c49b5248bd0253d))
|
|
159
|
+
* **wasmtime:** ask a stream for room before a blocking flush waits ([1dbf02b](https://github.com/elct9620/kobako/commit/1dbf02bdc8309344366f40245cad5a3198bcf74b))
|
|
160
|
+
* **wasmtime:** ask a UDP address only what wasmtime asks, and its size first ([934d2eb](https://github.com/elct9620/kobako/commit/934d2eb8b7034db263423b8ad925a56ea731b1f4))
|
|
161
|
+
* **wasmtime:** bound what one preview2 call lifts by its hostcall fuel ([99ebca7](https://github.com/elct9620/kobako/commit/99ebca726a803d2de0b12bfcbcf7382bf7ab1308))
|
|
162
|
+
* **wasmtime:** charge each preview2 handle to the Invocation's memory ([def575a](https://github.com/elct9620/kobako/commit/def575a581b777e1a4c7bcb3604d3036b01b6284))
|
|
163
|
+
* **wasmtime:** check a preview2 return area whole once the call returns ([9910dea](https://github.com/elct9620/kobako/commit/9910dea5e4e13056d9007b78d99f67486ebb0bdc))
|
|
164
|
+
* **wasmtime:** close a TCP input stream once its receive side shuts ([76d944a](https://github.com/elct9620/kobako/commit/76d944a966e152f9e16e9fc0d61b8765b65a7418))
|
|
165
|
+
* **wasmtime:** close an output stream once a call on it fails ([df6b96f](https://github.com/elct9620/kobako/commit/df6b96fc65e3fba8ad4bbf92edebbf35639547d2))
|
|
166
|
+
* **wasmtime:** count a socket, a lookup, or an exchange as one file ([b5633e4](https://github.com/elct9620/kobako/commit/b5633e4c1e2d1efba35ef4a9c3f7f97b2c1ea65e))
|
|
167
|
+
* **wasmtime:** derive preview1's errno from its name, and map two more to preview2 ([aabd599](https://github.com/elct9620/kobako/commit/aabd5997070291dbe5055ae6b075f85f890f674b))
|
|
168
|
+
* **wasmtime:** end a blocking flush on a hang-up as its pollable does ([272aeb8](https://github.com/elct9620/kobako/commit/272aeb893052954be8f2274186f6fab93a66f46e))
|
|
169
|
+
* **wasmtime:** end a run its host gave up at its next preview2 call ([0d1b324](https://github.com/elct9620/kobako/commit/0d1b32494c501ee346f50e39e8e38d7fb885dab9))
|
|
170
|
+
* **wasmtime:** give back the charge of a growth wasmtime then fails ([070c463](https://github.com/elct9620/kobako/commit/070c463e11428eb27465d6d9a9e7ba38b738249f))
|
|
171
|
+
* **wasmtime:** hand out only the datagrams of the peer a stream was made with ([88123ea](https://github.com/elct9620/kobako/commit/88123ea0f6f4d128ae7af8f43a9e0bf063c8c309))
|
|
172
|
+
* **wasmtime:** hold a socket's streams and pollables as its children ([0957eda](https://github.com/elct9620/kobako/commit/0957eda5a2159e402573ddfa7e2de5e941adea80))
|
|
173
|
+
* **wasmtime:** hold preview1's files in the preview2 resource table ([d447054](https://github.com/elct9620/kobako/commit/d447054dee66c3b234975ca6331dce3ed9a76d8e))
|
|
174
|
+
* **wasmtime:** judge a TCP socket's pollable by the connect under way as it is polled ([b89bccd](https://github.com/elct9620/kobako/commit/b89bccdba789d69dc7b69ad07a7176b0d310b963))
|
|
175
|
+
* **wasmtime:** lend a standard stream's handle to its descriptor ([74059ac](https://github.com/elct9620/kobako/commit/74059ac5a2651d2ffe8decc0b8feb528f49dad40))
|
|
176
|
+
* **wasmtime:** let a blocking flush of nothing succeed once a stream closes ([bc76ab7](https://github.com/elct9620/kobako/commit/bc76ab72fb104326cfffbd5d4d524a6d75d89887))
|
|
177
|
+
* **wasmtime:** make every pollable a child of what it watches ([48a0d2c](https://github.com/elct9620/kobako/commit/48a0d2c1cab25232baf29a9632e9b8a76413d236))
|
|
178
|
+
* **wasmtime:** number preview2 handles apart and reach no socket from preview1 ([adb0341](https://github.com/elct9620/kobako/commit/adb03410fd12804ccdaccd94748c6d1415417407))
|
|
179
|
+
* **wasmtime:** number preview2 handles from the descriptor space and trap a misnamed drop ([925a724](https://github.com/elct9620/kobako/commit/925a7244007e7fd72bec43f1b5dd5fa0d419dc84))
|
|
180
|
+
* **wasmtime:** permit a datagram send whenever its pollable is ready, and end a full flush on close ([8cf4961](https://github.com/elct9620/kobako/commit/8cf49612ee3af7ae5002ffa7b373a8b0579c2b78))
|
|
181
|
+
* **wasmtime:** poll an output stream ready only when it takes a write ([3247e0e](https://github.com/elct9620/kobako/commit/3247e0e80e5fee98e83e562b8fc99484d5863b8e))
|
|
182
|
+
* **wasmtime:** ready a closed output stream's pollable at once ([4ebd41a](https://github.com/elct9620/kobako/commit/4ebd41a90c5ee96f9e3ca90eea2fcb6246eb6ef5))
|
|
183
|
+
* **wasmtime:** refuse a negative read or write offset before the descriptor ([9b99512](https://github.com/elct9620/kobako/commit/9b995124380f0571b08c0cb68585c2acacf3d91a))
|
|
184
|
+
* **wasmtime:** refuse a short socket write whole, before any byte leaves ([5be1ec0](https://github.com/elct9620/kobako/commit/5be1ec027474376ecfcadce6d280891efe1a0afa))
|
|
185
|
+
* **wasmtime:** register an output stream's wait before reading its flush ([d3e9d11](https://github.com/elct9620/kobako/commit/d3e9d11ef993e18d9bbf9ceb49c0f3ec3039ec87))
|
|
186
|
+
* **wasmtime:** report RSYNC beside SYNC for a file opened to sync ([da46930](https://github.com/elct9620/kobako/commit/da46930be0a874bbdce2c6bccb85355a769b4912))
|
|
187
|
+
* **wasmtime:** reserve a producer's file once, where its limit is answered ([938ef0e](https://github.com/elct9620/kobako/commit/938ef0ea0b1531c7a5a0fe692d6b80d19dfbcc8d))
|
|
188
|
+
* **wasmtime:** round a keepalive time's part of a second up, as wasmtime's reaches the host ([31c5184](https://github.com/elct9620/kobako/commit/31c51843e4e6758179b05725334203915aa42611))
|
|
189
|
+
* **wasmtime:** spend a poll's fuel by the host's size of each subscription ([56cc303](https://github.com/elct9620/kobako/commit/56cc303bbef8f2bf03225de17d7ebab6ce384da9))
|
|
190
|
+
* **wasmtime:** trap a preview2 handle the guest does not hold as it is lifted ([f866c42](https://github.com/elct9620/kobako/commit/f866c4279ab54b581c0e827266c7b9ce75e4c371))
|
|
191
|
+
* **wasmtime:** trap and fail where the WIT says, and map errors as wasmtime-wasi does ([f8241ba](https://github.com/elct9620/kobako/commit/f8241baa1ebe9e399e6ce658f60d24e716b59522))
|
|
192
|
+
* **wasmtime:** trap on a misaligned preview2 return area ([6192d9e](https://github.com/elct9620/kobako/commit/6192d9e7db3d3f42ab2520b9a3a25d168bd341b6))
|
|
193
|
+
* **wasmtime:** trap on a preview2 list past the guest's memory before reading it ([7d9dc3c](https://github.com/elct9620/kobako/commit/7d9dc3ce63d8936053046cacaef4b31a6dadf86a))
|
|
194
|
+
* **wasmtime:** wait once per handle a poll lists more than once ([682fb21](https://github.com/elct9620/kobako/commit/682fb21b0623d015ebd5de4b1c78628eba99fef2))
|
|
195
|
+
* **wasmtime:** wait through preview2's poll from poll_oneoff ([760a280](https://github.com/elct9620/kobako/commit/760a28052853cbdb2dc9aa49cda2d1883744b86b))
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Code Refactoring
|
|
199
|
+
|
|
200
|
+
* **options:** take every option's default from the runtime ([1982afe](https://github.com/elct9620/kobako/commit/1982afe89a987a269e1d8c42f69207e05f64ee40))
|
|
201
|
+
* **runtime:** name the errno type Errno at the crate root ([f608e31](https://github.com/elct9620/kobako/commit/f608e31e81d1be9ddc6bb2fc8f6a26e5acafced4))
|
|
202
|
+
* **runtime:** name the missing Guest Binary's setup failure after what is missing ([732b8be](https://github.com/elct9620/kobako/commit/732b8bece8e796bd36d5e350b623c5ab8db28349))
|
|
203
|
+
* **sdk:** hold a Sandbox's caps as the runtime's Limits ([9730d6a](https://github.com/elct9620/kobako/commit/9730d6a73fec595c2b75ac8981aeb655937045df))
|
|
204
|
+
* **security:** prepare an invocation's Cred as Linux's prepare_creds does ([e4f8f86](https://github.com/elct9620/kobako/commit/e4f8f86f3b25fd468f54dcc332e5767ac4ac9c32))
|
|
205
|
+
* **transport:** load a Driver from its file, and read an origin as a lookup that may miss ([4ec8d79](https://github.com/elct9620/kobako/commit/4ec8d792ddf14bb21cfd36437b64b2389ee6df89))
|
|
206
|
+
* **transport:** name a Call's reply CallReply beside YieldReply and CompileReply ([f34063e](https://github.com/elct9620/kobako/commit/f34063ee94edb723800b4a0670cf912aa1a445e0))
|
|
207
|
+
* **vfs:** build a change, a call, and a device number by the names Rust and Linux use ([f5710f8](https://github.com/elct9620/kobako/commit/f5710f82f0452d8aeb7dd8ee7cc2b822ae7c14fe))
|
|
208
|
+
* **vfs:** read an inode's or a file's type as file_type ([48150f7](https://github.com/elct9620/kobako/commit/48150f75263e9c195a8751ba8a9654c029162aa6))
|
|
209
|
+
* **vfs:** spell a rename, a listing, and an open file's flags as Linux and Rust do ([5bc0175](https://github.com/elct9620/kobako/commit/5bc01757679c2b68c77e22dd86e3dac9f001f4b5))
|
|
210
|
+
|
|
3
211
|
## [0.20.0](https://github.com/elct9620/kobako/compare/kobako-wasmtime-v0.19.0...kobako-wasmtime-v0.20.0) (2026-11-07)
|
|
4
212
|
|
|
5
213
|
|
|
@@ -11,11 +11,12 @@ contract surface.
|
|
|
11
11
|
| Mechanic | What the driver holds |
|
|
12
12
|
|---|---|
|
|
13
13
|
| Compilation | process-wide Engine and compiled-Module caches |
|
|
14
|
-
| Disk cache | AOT `.cwasm` artifacts
|
|
14
|
+
| Disk cache | AOT `.cwasm` artifacts in a user-private directory, keyed by content and engine |
|
|
15
15
|
| Instantiation | a pre-linked `InstancePre` per guest path, a fresh instance per invocation |
|
|
16
16
|
| Bounds | epoch-based wall-clock deadlines on setup and on each invocation, and the per-invocation linear-memory cap |
|
|
17
17
|
| Ambient denial | under the default hermetic profile, frozen clocks and a constant RNG |
|
|
18
|
-
| Filesystems |
|
|
18
|
+
| Filesystems | one preopen, the root every Mount stands beneath, and its own capped descriptor table |
|
|
19
|
+
| WASI 0.2 imports | the `wasi:sockets`, `wasi:http` client, `wasi:io`, and clock subscriptions a core module links, generated from `wit/` |
|
|
19
20
|
|
|
20
21
|
Each invocation discards its Store once it ends, so nothing one leaves
|
|
21
22
|
behind reaches the next. The kobako Ruby gem's native ext is the first
|
|
@@ -28,7 +29,7 @@ Add the crate beside `kobako-runtime` to run a Guest Binary through its
|
|
|
28
29
|
|
|
29
30
|
```toml
|
|
30
31
|
[dependencies]
|
|
31
|
-
kobako-wasmtime = "0.
|
|
32
|
+
kobako-wasmtime = "0.22.0" # x-release-please-version
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
## License
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
package wasi:cli@0.2.12;
|
|
2
|
+
|
|
3
|
+
@since(version = 0.2.0)
|
|
4
|
+
interface environment {
|
|
5
|
+
/// Get the POSIX-style environment variables.
|
|
6
|
+
///
|
|
7
|
+
/// Each environment variable is provided as a pair of string variable names
|
|
8
|
+
/// and string value.
|
|
9
|
+
///
|
|
10
|
+
/// Morally, these are a value import, but until value imports are available
|
|
11
|
+
/// in the component model, this import function should return the same
|
|
12
|
+
/// values each time it is called.
|
|
13
|
+
@since(version = 0.2.0)
|
|
14
|
+
get-environment: func() -> list<tuple<string, string>>;
|
|
15
|
+
|
|
16
|
+
/// Get the POSIX-style arguments to the program.
|
|
17
|
+
@since(version = 0.2.0)
|
|
18
|
+
get-arguments: func() -> list<string>;
|
|
19
|
+
|
|
20
|
+
/// Return a path that programs should use as their initial current working
|
|
21
|
+
/// directory, interpreting `.` as shorthand for this.
|
|
22
|
+
@since(version = 0.2.0)
|
|
23
|
+
initial-cwd: func() -> option<string>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@since(version = 0.2.0)
|
|
27
|
+
interface exit {
|
|
28
|
+
/// Exit the current instance and any linked instances.
|
|
29
|
+
@since(version = 0.2.0)
|
|
30
|
+
exit: func(status: result);
|
|
31
|
+
|
|
32
|
+
/// Exit the current instance and any linked instances, reporting the
|
|
33
|
+
/// specified status code to the host.
|
|
34
|
+
///
|
|
35
|
+
/// The meaning of the code depends on the context, with 0 usually meaning
|
|
36
|
+
/// "success", and other values indicating various types of failure.
|
|
37
|
+
///
|
|
38
|
+
/// This function does not return; the effect is analogous to a trap, but
|
|
39
|
+
/// without the connotation that something bad has happened.
|
|
40
|
+
@since(version = 0.2.12)
|
|
41
|
+
exit-with-code: func(status-code: u8);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@since(version = 0.2.0)
|
|
45
|
+
interface run {
|
|
46
|
+
/// Run the program.
|
|
47
|
+
@since(version = 0.2.0)
|
|
48
|
+
run: func() -> result;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@since(version = 0.2.0)
|
|
52
|
+
interface stdin {
|
|
53
|
+
@since(version = 0.2.0)
|
|
54
|
+
use wasi:io/streams@0.2.12.{input-stream};
|
|
55
|
+
|
|
56
|
+
@since(version = 0.2.0)
|
|
57
|
+
get-stdin: func() -> input-stream;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@since(version = 0.2.0)
|
|
61
|
+
interface stdout {
|
|
62
|
+
@since(version = 0.2.0)
|
|
63
|
+
use wasi:io/streams@0.2.12.{output-stream};
|
|
64
|
+
|
|
65
|
+
@since(version = 0.2.0)
|
|
66
|
+
get-stdout: func() -> output-stream;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@since(version = 0.2.0)
|
|
70
|
+
interface stderr {
|
|
71
|
+
@since(version = 0.2.0)
|
|
72
|
+
use wasi:io/streams@0.2.12.{output-stream};
|
|
73
|
+
|
|
74
|
+
@since(version = 0.2.0)
|
|
75
|
+
get-stderr: func() -> output-stream;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// Terminal input.
|
|
79
|
+
///
|
|
80
|
+
/// In the future, this may include functions for disabling echoing,
|
|
81
|
+
/// disabling input buffering so that keyboard events are sent through
|
|
82
|
+
/// immediately, querying supported features, and so on.
|
|
83
|
+
@since(version = 0.2.0)
|
|
84
|
+
interface terminal-input {
|
|
85
|
+
/// The input side of a terminal.
|
|
86
|
+
@since(version = 0.2.0)
|
|
87
|
+
resource terminal-input;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/// Terminal output.
|
|
91
|
+
///
|
|
92
|
+
/// In the future, this may include functions for querying the terminal
|
|
93
|
+
/// size, being notified of terminal size changes, querying supported
|
|
94
|
+
/// features, and so on.
|
|
95
|
+
@since(version = 0.2.0)
|
|
96
|
+
interface terminal-output {
|
|
97
|
+
/// The output side of a terminal.
|
|
98
|
+
@since(version = 0.2.0)
|
|
99
|
+
resource terminal-output;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/// An interface providing an optional `terminal-input` for stdin as a
|
|
103
|
+
/// link-time authority.
|
|
104
|
+
@since(version = 0.2.0)
|
|
105
|
+
interface terminal-stdin {
|
|
106
|
+
@since(version = 0.2.0)
|
|
107
|
+
use terminal-input.{terminal-input};
|
|
108
|
+
|
|
109
|
+
/// If stdin is connected to a terminal, return a `terminal-input` handle
|
|
110
|
+
/// allowing further interaction with it.
|
|
111
|
+
@since(version = 0.2.0)
|
|
112
|
+
get-terminal-stdin: func() -> option<terminal-input>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/// An interface providing an optional `terminal-output` for stdout as a
|
|
116
|
+
/// link-time authority.
|
|
117
|
+
@since(version = 0.2.0)
|
|
118
|
+
interface terminal-stdout {
|
|
119
|
+
@since(version = 0.2.0)
|
|
120
|
+
use terminal-output.{terminal-output};
|
|
121
|
+
|
|
122
|
+
/// If stdout is connected to a terminal, return a `terminal-output` handle
|
|
123
|
+
/// allowing further interaction with it.
|
|
124
|
+
@since(version = 0.2.0)
|
|
125
|
+
get-terminal-stdout: func() -> option<terminal-output>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/// An interface providing an optional `terminal-output` for stderr as a
|
|
129
|
+
/// link-time authority.
|
|
130
|
+
@since(version = 0.2.0)
|
|
131
|
+
interface terminal-stderr {
|
|
132
|
+
@since(version = 0.2.0)
|
|
133
|
+
use terminal-output.{terminal-output};
|
|
134
|
+
|
|
135
|
+
/// If stderr is connected to a terminal, return a `terminal-output` handle
|
|
136
|
+
/// allowing further interaction with it.
|
|
137
|
+
@since(version = 0.2.0)
|
|
138
|
+
get-terminal-stderr: func() -> option<terminal-output>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@since(version = 0.2.0)
|
|
142
|
+
world imports {
|
|
143
|
+
@since(version = 0.2.0)
|
|
144
|
+
import environment;
|
|
145
|
+
@since(version = 0.2.0)
|
|
146
|
+
import exit;
|
|
147
|
+
@since(version = 0.2.0)
|
|
148
|
+
import wasi:io/error@0.2.12;
|
|
149
|
+
@since(version = 0.2.0)
|
|
150
|
+
import wasi:io/poll@0.2.12;
|
|
151
|
+
@since(version = 0.2.0)
|
|
152
|
+
import wasi:io/streams@0.2.12;
|
|
153
|
+
@since(version = 0.2.0)
|
|
154
|
+
import stdin;
|
|
155
|
+
@since(version = 0.2.0)
|
|
156
|
+
import stdout;
|
|
157
|
+
@since(version = 0.2.0)
|
|
158
|
+
import stderr;
|
|
159
|
+
@since(version = 0.2.0)
|
|
160
|
+
import terminal-input;
|
|
161
|
+
@since(version = 0.2.0)
|
|
162
|
+
import terminal-output;
|
|
163
|
+
@since(version = 0.2.0)
|
|
164
|
+
import terminal-stdin;
|
|
165
|
+
@since(version = 0.2.0)
|
|
166
|
+
import terminal-stdout;
|
|
167
|
+
@since(version = 0.2.0)
|
|
168
|
+
import terminal-stderr;
|
|
169
|
+
import wasi:clocks/monotonic-clock@0.2.12;
|
|
170
|
+
import wasi:clocks/wall-clock@0.2.12;
|
|
171
|
+
@unstable(feature = clocks-timezone)
|
|
172
|
+
import wasi:clocks/timezone@0.2.12;
|
|
173
|
+
import wasi:filesystem/types@0.2.12;
|
|
174
|
+
import wasi:filesystem/preopens@0.2.12;
|
|
175
|
+
import wasi:sockets/network@0.2.12;
|
|
176
|
+
import wasi:sockets/instance-network@0.2.12;
|
|
177
|
+
import wasi:sockets/udp@0.2.12;
|
|
178
|
+
import wasi:sockets/udp-create-socket@0.2.12;
|
|
179
|
+
import wasi:sockets/tcp@0.2.12;
|
|
180
|
+
import wasi:sockets/tcp-create-socket@0.2.12;
|
|
181
|
+
import wasi:sockets/ip-name-lookup@0.2.12;
|
|
182
|
+
import wasi:random/random@0.2.12;
|
|
183
|
+
import wasi:random/insecure@0.2.12;
|
|
184
|
+
import wasi:random/insecure-seed@0.2.12;
|
|
185
|
+
}
|
|
186
|
+
@since(version = 0.2.0)
|
|
187
|
+
world command {
|
|
188
|
+
@since(version = 0.2.0)
|
|
189
|
+
import environment;
|
|
190
|
+
@since(version = 0.2.0)
|
|
191
|
+
import exit;
|
|
192
|
+
@since(version = 0.2.0)
|
|
193
|
+
import wasi:io/error@0.2.12;
|
|
194
|
+
@since(version = 0.2.0)
|
|
195
|
+
import wasi:io/poll@0.2.12;
|
|
196
|
+
@since(version = 0.2.0)
|
|
197
|
+
import wasi:io/streams@0.2.12;
|
|
198
|
+
@since(version = 0.2.0)
|
|
199
|
+
import stdin;
|
|
200
|
+
@since(version = 0.2.0)
|
|
201
|
+
import stdout;
|
|
202
|
+
@since(version = 0.2.0)
|
|
203
|
+
import stderr;
|
|
204
|
+
@since(version = 0.2.0)
|
|
205
|
+
import terminal-input;
|
|
206
|
+
@since(version = 0.2.0)
|
|
207
|
+
import terminal-output;
|
|
208
|
+
@since(version = 0.2.0)
|
|
209
|
+
import terminal-stdin;
|
|
210
|
+
@since(version = 0.2.0)
|
|
211
|
+
import terminal-stdout;
|
|
212
|
+
@since(version = 0.2.0)
|
|
213
|
+
import terminal-stderr;
|
|
214
|
+
import wasi:clocks/monotonic-clock@0.2.12;
|
|
215
|
+
import wasi:clocks/wall-clock@0.2.12;
|
|
216
|
+
@unstable(feature = clocks-timezone)
|
|
217
|
+
import wasi:clocks/timezone@0.2.12;
|
|
218
|
+
import wasi:filesystem/types@0.2.12;
|
|
219
|
+
import wasi:filesystem/preopens@0.2.12;
|
|
220
|
+
import wasi:sockets/network@0.2.12;
|
|
221
|
+
import wasi:sockets/instance-network@0.2.12;
|
|
222
|
+
import wasi:sockets/udp@0.2.12;
|
|
223
|
+
import wasi:sockets/udp-create-socket@0.2.12;
|
|
224
|
+
import wasi:sockets/tcp@0.2.12;
|
|
225
|
+
import wasi:sockets/tcp-create-socket@0.2.12;
|
|
226
|
+
import wasi:sockets/ip-name-lookup@0.2.12;
|
|
227
|
+
import wasi:random/random@0.2.12;
|
|
228
|
+
import wasi:random/insecure@0.2.12;
|
|
229
|
+
import wasi:random/insecure-seed@0.2.12;
|
|
230
|
+
|
|
231
|
+
@since(version = 0.2.0)
|
|
232
|
+
export run;
|
|
233
|
+
}
|