kobako 0.30.0 → 0.32.0
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/Cargo.lock +868 -447
- data/README.md +43 -4
- data/ROADMAP.md +1 -2
- data/crates/kobako-runtime/CHANGELOG.md +309 -0
- data/crates/kobako-runtime/Cargo.toml +58 -11
- data/crates/kobako-runtime/README.md +7 -4
- data/crates/kobako-runtime/src/cred.rs +136 -0
- data/crates/kobako-runtime/src/dispatch.rs +4 -5
- data/crates/kobako-runtime/src/endpoint/buffer.rs +153 -44
- data/crates/kobako-runtime/src/endpoint/dispatch.rs +80 -41
- data/crates/kobako-runtime/src/endpoint/invoke.rs +23 -36
- data/crates/kobako-runtime/src/endpoint.rs +137 -36
- data/crates/kobako-runtime/src/errno.rs +391 -0
- data/crates/kobako-runtime/src/error.rs +31 -10
- data/crates/kobako-runtime/src/filesystem/anon_inodes.rs +52 -0
- data/crates/kobako-runtime/src/filesystem/bind/fid.rs +300 -22
- data/crates/kobako-runtime/src/filesystem/bind/lookup.rs +101 -29
- data/crates/kobako-runtime/src/filesystem/bind/unicode.rs +109 -0
- data/crates/kobako-runtime/src/filesystem/bind/walk.rs +52 -34
- data/crates/kobako-runtime/src/filesystem/bind.rs +812 -447
- data/crates/kobako-runtime/src/filesystem/overlay/file.rs +6 -6
- data/crates/kobako-runtime/src/filesystem/overlay/path.rs +43 -65
- data/crates/kobako-runtime/src/filesystem/overlay/stack/copy_up.rs +11 -16
- data/crates/kobako-runtime/src/filesystem/overlay/stack/dir.rs +47 -72
- data/crates/kobako-runtime/src/filesystem/overlay/stack/namei.rs +12 -12
- data/crates/kobako-runtime/src/filesystem/overlay/stack/readdir.rs +4 -7
- data/crates/kobako-runtime/src/filesystem/overlay/stack.rs +120 -37
- data/crates/kobako-runtime/src/filesystem/overlay.rs +578 -388
- data/crates/kobako-runtime/src/filesystem/pipe.rs +12 -9
- data/crates/kobako-runtime/src/filesystem/rdir.rs +14 -50
- data/crates/kobako-runtime/src/filesystem/testing.rs +31 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs/seed.rs +32 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs/tmpfile.rs +3 -3
- data/crates/kobako-runtime/src/filesystem/tmpfs/whiteout.rs +57 -35
- data/crates/kobako-runtime/src/filesystem/tmpfs/xattr.rs +2 -2
- data/crates/kobako-runtime/src/filesystem/tmpfs.rs +219 -173
- data/crates/kobako-runtime/src/filesystem/wrap.rs +36 -52
- data/crates/kobako-runtime/src/filesystem.rs +8 -3
- data/crates/kobako-runtime/src/fork.rs +319 -0
- data/crates/kobako-runtime/src/grant.rs +3 -0
- data/crates/kobako-runtime/src/hashtable.rs +4 -2
- data/crates/kobako-runtime/src/lib.rs +18 -7
- data/crates/kobako-runtime/src/limits.rs +171 -0
- data/crates/kobako-runtime/src/locking/seqlock.rs +29 -3
- data/crates/kobako-runtime/src/locking.rs +518 -113
- data/crates/kobako-runtime/src/memcg.rs +306 -0
- data/crates/kobako-runtime/src/mount.rs +37 -9
- data/crates/kobako-runtime/src/net/backends.rs +43 -0
- data/crates/kobako-runtime/src/net/connections.rs +219 -0
- data/crates/kobako-runtime/src/net/credential.rs +125 -0
- data/crates/kobako-runtime/src/net/egress.rs +180 -0
- data/crates/kobako-runtime/src/net/family.rs +181 -0
- data/crates/kobako-runtime/src/net/http.rs +3165 -0
- data/crates/kobako-runtime/src/net/lookup.rs +385 -0
- data/crates/kobako-runtime/src/net/mock.rs +251 -0
- data/crates/kobako-runtime/src/net/namespace.rs +1368 -0
- data/crates/kobako-runtime/src/net/reactor.rs +626 -0
- data/crates/kobako-runtime/src/net/resolv/darwin.rs +280 -0
- data/crates/kobako-runtime/src/net/resolv/stub/tests.rs +519 -0
- data/crates/kobako-runtime/src/net/resolv/stub.rs +542 -0
- data/crates/kobako-runtime/src/net/resolv/windows.rs +218 -0
- data/crates/kobako-runtime/src/net/resolv.rs +251 -0
- data/crates/kobako-runtime/src/net/skbuff.rs +109 -0
- data/crates/kobako-runtime/src/net/socket.rs +869 -0
- data/crates/kobako-runtime/src/net/task.rs +223 -0
- data/crates/kobako-runtime/src/net/tcp.rs +1840 -0
- data/crates/kobako-runtime/src/net/tls.rs +120 -0
- data/crates/kobako-runtime/src/net/transport.rs +304 -0
- data/crates/kobako-runtime/src/net/udp.rs +1105 -0
- data/crates/kobako-runtime/src/net.rs +45 -0
- data/crates/kobako-runtime/src/network/builder.rs +177 -0
- data/crates/kobako-runtime/src/network/ruleset.rs +777 -0
- data/crates/kobako-runtime/src/network.rs +551 -0
- data/crates/kobako-runtime/src/policy.rs +16 -0
- data/crates/kobako-runtime/src/profile.rs +29 -144
- data/crates/kobako-runtime/src/runtime.rs +3 -5
- data/crates/kobako-runtime/src/sched.rs +338 -51
- data/crates/kobako-runtime/src/security/entry_policy.rs +22 -0
- data/crates/kobako-runtime/src/{vfs/cred.rs → security/hooks.rs} +52 -144
- data/crates/kobako-runtime/src/security/mount_policy.rs +158 -0
- data/crates/kobako-runtime/src/security.rs +125 -209
- data/crates/kobako-runtime/src/snapshot.rs +121 -2
- data/crates/kobako-runtime/src/vfs/attr.rs +5 -5
- data/crates/kobako-runtime/src/vfs/dentry.rs +210 -117
- data/crates/kobako-runtime/src/vfs/file.rs +243 -248
- data/crates/kobako-runtime/src/vfs/inode.rs +41 -45
- data/crates/kobako-runtime/src/vfs/kern_path.rs +62 -53
- data/crates/kobako-runtime/src/vfs/mount.rs +10 -9
- data/crates/kobako-runtime/src/vfs/namei.rs +1162 -818
- data/crates/kobako-runtime/src/vfs/namespace.rs +245 -0
- data/crates/kobako-runtime/src/vfs/open_files.rs +69 -0
- data/crates/kobako-runtime/src/vfs/openat2.rs +3 -3
- data/crates/kobako-runtime/src/vfs/path.rs +6 -6
- data/crates/kobako-runtime/src/vfs/readdir.rs +6 -6
- data/crates/kobako-runtime/src/vfs/stat.rs +248 -23
- data/crates/kobako-runtime/src/vfs/super_block.rs +18 -14
- data/crates/kobako-runtime/src/vfs/utimes.rs +37 -27
- data/crates/kobako-runtime/src/vfs.rs +10 -6
- data/crates/kobako-runtime/src/wait.rs +381 -0
- data/crates/kobako-transport/CHANGELOG.md +38 -0
- data/crates/kobako-transport/Cargo.toml +1 -1
- data/crates/kobako-transport/README.md +3 -4
- data/crates/kobako-transport/src/abi.rs +78 -72
- data/crates/kobako-transport/src/envelope/bytes.rs +17 -6
- data/crates/kobako-transport/src/envelope/call.rs +32 -4
- data/crates/kobako-transport/src/envelope/error_record.rs +21 -0
- data/crates/kobako-transport/src/envelope/name.rs +99 -0
- data/crates/kobako-transport/src/envelope/outcome.rs +9 -9
- data/crates/kobako-transport/src/envelope/preamble.rs +24 -21
- data/crates/kobako-transport/src/envelope/reply.rs +27 -27
- data/crates/kobako-transport/src/envelope/unsupported.rs +10 -10
- data/crates/kobako-transport/src/envelope.rs +13 -8
- data/crates/kobako-wasmtime/CHANGELOG.md +208 -0
- data/crates/kobako-wasmtime/Cargo.toml +47 -7
- data/crates/kobako-wasmtime/README.md +4 -3
- data/crates/kobako-wasmtime/build/preview2.rs +1339 -0
- data/crates/kobako-wasmtime/build.rs +16 -0
- data/crates/kobako-wasmtime/src/abi.rs +18 -37
- data/crates/kobako-wasmtime/src/ambient.rs +43 -19
- data/crates/kobako-wasmtime/src/cache/unix.rs +95 -0
- data/crates/kobako-wasmtime/src/cache/windows.rs +359 -0
- data/crates/kobako-wasmtime/src/cache.rs +106 -113
- data/crates/kobako-wasmtime/src/config.rs +52 -68
- data/crates/kobako-wasmtime/src/driver.rs +80 -82
- data/crates/kobako-wasmtime/src/exports.rs +143 -17
- data/crates/kobako-wasmtime/src/guest.rs +12 -6
- data/crates/kobako-wasmtime/src/guest_binary.rs +14 -0
- data/crates/kobako-wasmtime/src/imports.rs +42 -18
- data/crates/kobako-wasmtime/src/instance_pre.rs +4 -4
- data/crates/kobako-wasmtime/src/invocation.rs +91 -15
- data/crates/kobako-wasmtime/src/lib.rs +7 -3
- data/crates/kobako-wasmtime/src/limiter.rs +130 -12
- data/crates/kobako-wasmtime/src/preview1/descriptors.rs +305 -0
- data/crates/kobako-wasmtime/src/preview1/differential/mount.rs +9 -20
- data/crates/kobako-wasmtime/src/preview1/differential.rs +27 -31
- data/crates/kobako-wasmtime/src/preview1/errno.rs +55 -66
- data/crates/kobako-wasmtime/src/preview1/fd.rs +347 -312
- data/crates/kobako-wasmtime/src/preview1/memory.rs +21 -12
- data/crates/kobako-wasmtime/src/preview1/mount_view/wrap.rs +34 -53
- data/crates/kobako-wasmtime/src/preview1/mount_view.rs +335 -388
- data/crates/kobako-wasmtime/src/preview1/path.rs +56 -121
- data/crates/kobako-wasmtime/src/preview1/poll.rs +255 -125
- data/crates/kobako-wasmtime/src/preview1/random.rs +125 -0
- data/crates/kobako-wasmtime/src/preview1/sock.rs +10 -8
- data/crates/kobako-wasmtime/src/preview1/testing.rs +31 -0
- data/crates/kobako-wasmtime/src/preview1/testsuite.rs +5 -15
- data/crates/kobako-wasmtime/src/preview1.rs +131 -51
- data/crates/kobako-wasmtime/src/preview2/abi.rs +227 -0
- data/crates/kobako-wasmtime/src/preview2/error.rs +118 -0
- data/crates/kobako-wasmtime/src/preview2/filesystem.rs +122 -0
- data/crates/kobako-wasmtime/src/preview2/host.rs +4319 -0
- data/crates/kobako-wasmtime/src/preview2/http.rs +1587 -0
- data/crates/kobako-wasmtime/src/preview2/io.rs +328 -0
- data/crates/kobako-wasmtime/src/preview2/sockets.rs +379 -0
- data/crates/kobako-wasmtime/src/preview2/table.rs +257 -0
- data/crates/kobako-wasmtime/src/preview2.rs +57 -0
- data/crates/kobako-wasmtime/src/trap.rs +88 -28
- data/crates/kobako-wasmtime/src/waits.rs +59 -0
- data/crates/kobako-wasmtime/src/wasi.rs +291 -81
- 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/ext/kobako/Cargo.toml +6 -2
- data/ext/kobako/src/{runtime/errors.rs → errors.rs} +34 -26
- data/ext/kobako/src/escape.rs +404 -0
- data/ext/kobako/src/{runtime/filesystem → filesystem}/grants.rs +34 -32
- data/ext/kobako/src/{runtime/filesystem → filesystem}/ruby.rs +158 -170
- data/ext/kobako/src/{runtime/filesystem.rs → filesystem.rs} +71 -23
- data/ext/kobako/src/fork.rs +72 -0
- data/ext/kobako/src/gvl.rs +729 -0
- data/ext/kobako/src/handoff.rs +490 -0
- data/ext/kobako/src/lib.rs +74 -3
- data/ext/kobako/src/network/mock.rs +187 -0
- data/ext/kobako/src/network.rs +593 -0
- data/ext/kobako/src/pinned_value.rs +44 -0
- data/ext/kobako/src/runtime/bridge.rs +58 -50
- data/ext/kobako/src/runtime/snapshot.rs +4 -4
- data/ext/kobako/src/runtime.rs +272 -163
- data/ext/kobako/src/wire.rs +42 -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 +97 -37
- data/crates/kobako-runtime/src/endpoint/capture.rs +0 -115
- data/crates/kobako-runtime/src/endpoint/memory_cap.rs +0 -238
- data/crates/kobako-runtime/src/filesystem/path.rs +0 -21
- data/crates/kobako-runtime/src/vfs/errno.rs +0 -153
- data/crates/kobako-runtime/tests/linux_baseline/calls.rs +0 -171
- data/crates/kobako-runtime/tests/linux_baseline/concurrent.rs +0 -276
- data/crates/kobako-runtime/tests/linux_baseline/kobako.rs +0 -323
- data/crates/kobako-runtime/tests/linux_baseline/linux-baseline-expected.txt +0 -16
- data/crates/kobako-runtime/tests/linux_baseline/linux.rs +0 -449
- data/crates/kobako-runtime/tests/linux_baseline/main.rs +0 -611
- data/crates/kobako-runtime/tests/linux_baseline/permissions.rs +0 -236
- data/crates/kobako-wasmtime/src/descriptors.rs +0 -200
- data/crates/kobako-wasmtime/tests/integration/compile_posture.rs +0 -43
- data/crates/kobako-wasmtime/tests/integration/guest_file.rs +0 -1085
- data/crates/kobako-wasmtime/tests/integration/main.rs +0 -29
- data/crates/kobako-wasmtime/tests/integration/preamble_flags.rs +0 -70
- data/crates/kobako-wasmtime/tests/integration/snippet_compile.rs +0 -95
- data/crates/kobako-wasmtime/tests/integration/support/mod.rs +0 -30
- data/crates/kobako-wasmtime/tests/integration/unanswered_call.rs +0 -86
- data/crates/kobako-wasmtime/tests/integration/unsupported_call.rs +0 -51
- data/ext/kobako/src/runtime/escape.rs +0 -67
- data/ext/kobako/src/runtime/gvl.rs +0 -147
- data/ext/kobako/src/runtime/pinned_value.rs +0 -31
- 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
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
[package]
|
|
17
17
|
name = "kobako-wasmtime"
|
|
18
|
-
version = "0.
|
|
18
|
+
version = "0.22.0"
|
|
19
19
|
edition = "2021"
|
|
20
20
|
# The toolchain this crate is built and tested on, the first whose stripped
|
|
21
21
|
# Apple binary macOS 26 loads.
|
|
@@ -26,15 +26,18 @@ repository = "https://github.com/elct9620/kobako"
|
|
|
26
26
|
readme = "README.md"
|
|
27
27
|
keywords = ["wasm", "mruby", "sandbox", "wasi", "wasmtime"]
|
|
28
28
|
categories = ["wasm", "virtualization"]
|
|
29
|
+
# The tests reach files only this repository holds, so a copy of the crate
|
|
30
|
+
# taken to customize builds without them.
|
|
31
|
+
exclude = ["tests/"]
|
|
29
32
|
|
|
30
33
|
[dependencies]
|
|
31
34
|
# The engine-neutral contract this crate implements. The version pin
|
|
32
35
|
# rides the linked release group; the path keeps in-tree builds (and
|
|
33
36
|
# the Ruby gem, which ships both crates) resolving locally.
|
|
34
|
-
kobako-runtime = { version = "0.
|
|
37
|
+
kobako-runtime = { version = "0.22.0", path = "../kobako-runtime" }
|
|
35
38
|
# The fixed tier: the Envelope this driver shuttles and the ABI
|
|
36
39
|
# values it drives the exports against.
|
|
37
|
-
kobako-transport = { version = "0.
|
|
40
|
+
kobako-transport = { version = "0.22.0", path = "../kobako-transport" }
|
|
38
41
|
# wasmtime — host-side embedder for kobako.wasm. We disable default-features
|
|
39
42
|
# and opt back in only what kobako needs: a Cranelift-backed runtime that can
|
|
40
43
|
# compile a pre-built wasm32-wasip1 module on the host triple, plus the `wat`
|
|
@@ -42,8 +45,9 @@ kobako-transport = { version = "0.20.0", path = "../kobako-transport" }
|
|
|
42
45
|
# `cache` / `parallel-compilation` / `pooling` are intentionally off —
|
|
43
46
|
# kobako runs short-lived synchronous sandboxes. `component-model` and
|
|
44
47
|
# `async` still arrive through wasmtime-wasi's `p1`, which builds on `p2`;
|
|
45
|
-
# kobako loads only core Modules, so none of that code is reached.
|
|
46
|
-
|
|
48
|
+
# kobako loads only core Modules, so none of that code is reached. The floor
|
|
49
|
+
# is the first 50 release carrying the engine's security fixes.
|
|
50
|
+
wasmtime = { version = "50.0.1", default-features = false, features = [
|
|
47
51
|
"cranelift",
|
|
48
52
|
"runtime",
|
|
49
53
|
"gc",
|
|
@@ -56,18 +60,54 @@ wasmtime = { version = "50.0.0", default-features = false, features = [
|
|
|
56
60
|
# (args, environ, clocks, random); kobako answers every call that reads
|
|
57
61
|
# its own descriptor table. `p1` is the only feature kobako asks for; it
|
|
58
62
|
# enables `p2` itself, while `p0` and `p3` stay off.
|
|
59
|
-
wasmtime-wasi = { version = "50.0.
|
|
63
|
+
wasmtime-wasi = { version = "50.0.1", default-features = false, features = ["p1"] }
|
|
64
|
+
# rand names the generator wasmtime-wasi takes for a guest's entropy;
|
|
65
|
+
# `sys_rng` asks the OS on each draw, so a forked child holds no state that
|
|
66
|
+
# repeats its parent's draws, as a thread's ThreadRng does.
|
|
67
|
+
rand = { version = "0.10.1", default-features = false, features = ["sys_rng"] }
|
|
60
68
|
# wiggle generates the preview1 calls kobako answers from `witx/`, as it
|
|
61
69
|
# generates wasmtime-wasi's, so each takes its arguments and writes its answer
|
|
62
70
|
# as wasmtime-wasi does. It rides wasmtime's release train.
|
|
63
|
-
wiggle = { version = "50.0.
|
|
71
|
+
wiggle = { version = "50.0.1", default-features = false, features = ["wasmtime"] }
|
|
64
72
|
# sha2 keys the on-disk compiled-module cache by Guest Binary content
|
|
65
73
|
# (see cache.rs); a collision would load the wrong artifact, so the
|
|
66
74
|
# hash must be cryptographic.
|
|
67
75
|
sha2 = "0.11"
|
|
68
76
|
|
|
77
|
+
[dev-dependencies]
|
|
78
|
+
# wasmparser reads the bundled Guest Binary, to witness what each ABI export
|
|
79
|
+
# can call and what the binary imports.
|
|
80
|
+
wasmparser = "0.263.0"
|
|
81
|
+
|
|
82
|
+
# libc forks a test's process, to witness what a child keeps of its parent.
|
|
83
|
+
[target.'cfg(unix)'.dev-dependencies]
|
|
84
|
+
libc = "0.2.191"
|
|
85
|
+
|
|
86
|
+
[build-dependencies]
|
|
87
|
+
# build.rs generates the WASI 0.2 imports a Guest Binary links as a core
|
|
88
|
+
# module from `wit/`, as wiggle generates preview1's from `witx/`.
|
|
89
|
+
# wit-bindgen-core walks the Canonical ABI and re-exports the wit-parser
|
|
90
|
+
# it was built against.
|
|
91
|
+
wit-bindgen-core = "0.63.0"
|
|
92
|
+
# wit-parser reports a malformed `wit/` as `anyhow::Error`, which build.rs
|
|
93
|
+
# hands back to cargo.
|
|
94
|
+
anyhow = "1.0.102"
|
|
95
|
+
|
|
96
|
+
[features]
|
|
97
|
+
# Off by default, as in wasmtime, so a host whose crash reporter takes
|
|
98
|
+
# faults over a Mach port, as breakpad does, still sees the guest's apart
|
|
99
|
+
# from its own. On, a guest's faults on macOS arrive as POSIX signals, which
|
|
100
|
+
# a forked child keeps; one setting holds for the whole process.
|
|
101
|
+
posix-signals-on-macos = []
|
|
102
|
+
|
|
69
103
|
# rustix reaches the cache directory through one descriptor, checked by
|
|
70
104
|
# owner, so the unsafe artifact deserialize reads only what that
|
|
71
105
|
# directory holds (see cache.rs); std has no `*at` calls.
|
|
72
106
|
[target.'cfg(unix)'.dependencies]
|
|
73
107
|
rustix = { version = "1.1.4", features = ["fs", "process"] }
|
|
108
|
+
|
|
109
|
+
# windows-sys reads and sets the cache directory's owner and DACL, which std
|
|
110
|
+
# cannot, so the unsafe artifact deserialize trusts it only as rustix lets
|
|
111
|
+
# Unix trust it.
|
|
112
|
+
[target.'cfg(windows)'.dependencies]
|
|
113
|
+
windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_SystemServices", "Win32_System_Threading"] }
|
|
@@ -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
|