kobako 0.29.0 → 0.31.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/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +552 -10
- data/Cargo.lock +595 -139
- data/README.md +126 -564
- data/ROADMAP.md +3 -2
- data/crates/kobako-runtime/CHANGELOG.md +488 -1
- data/crates/kobako-runtime/Cargo.toml +73 -15
- data/crates/kobako-runtime/README.md +11 -4
- data/crates/kobako-runtime/src/cred.rs +124 -0
- data/crates/kobako-runtime/src/dispatch.rs +5 -6
- data/crates/kobako-runtime/src/endpoint/buffer.rs +301 -0
- data/crates/kobako-runtime/src/endpoint/dispatch.rs +292 -0
- data/crates/kobako-runtime/src/endpoint/invoke.rs +181 -0
- data/crates/kobako-runtime/src/endpoint.rs +267 -0
- 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 +82 -0
- data/crates/kobako-runtime/src/filesystem/bind/lookup.rs +274 -0
- data/crates/kobako-runtime/src/filesystem/bind/walk.rs +248 -0
- data/crates/kobako-runtime/src/filesystem/bind.rs +2857 -0
- data/crates/kobako-runtime/src/filesystem/overlay/file.rs +89 -0
- data/crates/kobako-runtime/src/filesystem/overlay/inode.rs +106 -0
- data/crates/kobako-runtime/src/filesystem/overlay/path.rs +263 -0
- data/crates/kobako-runtime/src/filesystem/overlay/stack/copy_up.rs +128 -0
- data/crates/kobako-runtime/src/filesystem/overlay/stack/dir.rs +238 -0
- data/crates/kobako-runtime/src/filesystem/overlay/stack/namei.rs +135 -0
- data/crates/kobako-runtime/src/filesystem/overlay/stack/readdir.rs +54 -0
- data/crates/kobako-runtime/src/filesystem/overlay/stack.rs +316 -739
- data/crates/kobako-runtime/src/filesystem/overlay.rs +2627 -1154
- data/crates/kobako-runtime/src/filesystem/pipe.rs +224 -0
- data/crates/kobako-runtime/src/filesystem/rdir.rs +84 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs/seed.rs +32 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs/tmpfile.rs +32 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs/whiteout.rs +107 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs/xattr.rs +22 -0
- data/crates/kobako-runtime/src/filesystem/tmpfs.rs +1997 -0
- data/crates/kobako-runtime/src/filesystem/wrap.rs +208 -0
- data/crates/kobako-runtime/src/filesystem.rs +25 -388
- data/crates/kobako-runtime/src/fork.rs +96 -0
- data/crates/kobako-runtime/src/grant.rs +3 -0
- data/crates/kobako-runtime/src/hashtable.rs +46 -0
- data/crates/kobako-runtime/src/lib.rs +27 -11
- data/crates/kobako-runtime/src/limits.rs +195 -0
- data/crates/kobako-runtime/src/locking/seqlock.rs +66 -0
- data/crates/kobako-runtime/src/locking.rs +228 -0
- data/crates/kobako-runtime/src/memcg.rs +383 -0
- data/crates/kobako-runtime/src/mount.rs +86 -101
- data/crates/kobako-runtime/src/net/backends.rs +43 -0
- data/crates/kobako-runtime/src/net/connections.rs +179 -0
- data/crates/kobako-runtime/src/net/credential.rs +125 -0
- data/crates/kobako-runtime/src/net/egress.rs +160 -0
- data/crates/kobako-runtime/src/net/family.rs +181 -0
- data/crates/kobako-runtime/src/net/http.rs +2733 -0
- data/crates/kobako-runtime/src/net/lookup.rs +285 -0
- data/crates/kobako-runtime/src/net/mock.rs +251 -0
- data/crates/kobako-runtime/src/net/namespace.rs +1366 -0
- data/crates/kobako-runtime/src/net/reactor.rs +531 -0
- data/crates/kobako-runtime/src/net/resolv/darwin.rs +275 -0
- data/crates/kobako-runtime/src/net/resolv/stub/tests.rs +469 -0
- data/crates/kobako-runtime/src/net/resolv/stub.rs +536 -0
- data/crates/kobako-runtime/src/net/resolv/windows.rs +248 -0
- data/crates/kobako-runtime/src/net/resolv.rs +227 -0
- data/crates/kobako-runtime/src/net/socket.rs +870 -0
- data/crates/kobako-runtime/src/net/tcp.rs +1588 -0
- data/crates/kobako-runtime/src/net/tls.rs +58 -0
- data/crates/kobako-runtime/src/net/transport.rs +279 -0
- data/crates/kobako-runtime/src/net/udp.rs +1003 -0
- data/crates/kobako-runtime/src/net.rs +42 -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 +37 -16
- data/crates/kobako-runtime/src/runtime.rs +3 -5
- data/crates/kobako-runtime/src/sched.rs +311 -0
- data/crates/kobako-runtime/src/security/entry_policy.rs +22 -0
- data/crates/kobako-runtime/src/security/hooks.rs +242 -0
- data/crates/kobako-runtime/src/security/mount_policy.rs +158 -0
- data/crates/kobako-runtime/src/security.rs +601 -0
- data/crates/kobako-runtime/src/snapshot.rs +121 -2
- data/crates/kobako-runtime/src/vfs/attr.rs +162 -0
- data/crates/kobako-runtime/src/vfs/dentry.rs +1466 -0
- data/crates/kobako-runtime/src/vfs/file.rs +1911 -0
- data/crates/kobako-runtime/src/vfs/inode.rs +425 -0
- data/crates/kobako-runtime/src/vfs/kern_path.rs +213 -0
- data/crates/kobako-runtime/src/vfs/mount.rs +60 -0
- data/crates/kobako-runtime/src/vfs/namei.rs +5837 -0
- data/crates/kobako-runtime/src/vfs/namespace.rs +162 -0
- data/crates/kobako-runtime/src/vfs/open_files.rs +69 -0
- data/crates/kobako-runtime/src/vfs/openat2.rs +116 -0
- data/crates/kobako-runtime/src/vfs/path.rs +64 -0
- data/crates/kobako-runtime/src/vfs/readdir.rs +163 -0
- data/crates/kobako-runtime/src/vfs/stat.rs +293 -0
- data/crates/kobako-runtime/src/vfs/super_block.rs +126 -0
- data/crates/kobako-runtime/src/vfs/utimes.rs +299 -0
- data/crates/kobako-runtime/src/vfs.rs +63 -0
- data/crates/kobako-runtime/src/wait.rs +356 -0
- data/crates/kobako-transport/CHANGELOG.md +39 -2
- data/crates/kobako-transport/Cargo.toml +3 -3
- data/crates/kobako-transport/README.md +8 -8
- data/crates/kobako-transport/src/abi.rs +78 -72
- data/crates/kobako-transport/src/envelope/bytes.rs +49 -30
- data/crates/kobako-transport/src/envelope/call.rs +37 -9
- data/crates/kobako-transport/src/envelope/compile_reply.rs +2 -2
- data/crates/kobako-transport/src/envelope/error_record.rs +24 -3
- data/crates/kobako-transport/src/envelope/fault.rs +2 -2
- data/crates/kobako-transport/src/envelope/name.rs +99 -0
- data/crates/kobako-transport/src/envelope/outcome.rs +11 -11
- data/crates/kobako-transport/src/envelope/preamble.rs +34 -31
- data/crates/kobako-transport/src/envelope/reply.rs +29 -29
- data/crates/kobako-transport/src/envelope/request.rs +2 -2
- data/crates/kobako-transport/src/envelope/run.rs +1 -1
- data/crates/kobako-transport/src/envelope/unsupported.rs +12 -12
- data/crates/kobako-transport/src/envelope.rs +15 -10
- data/crates/kobako-wasmtime/CHANGELOG.md +315 -8
- data/crates/kobako-wasmtime/Cargo.toml +35 -15
- data/crates/kobako-wasmtime/README.md +11 -6
- data/crates/kobako-wasmtime/build/preview2.rs +1339 -0
- data/crates/kobako-wasmtime/build.rs +16 -0
- data/crates/kobako-wasmtime/src/abi.rs +19 -47
- data/crates/kobako-wasmtime/src/ambient.rs +33 -19
- data/crates/kobako-wasmtime/src/cache.rs +28 -20
- data/crates/kobako-wasmtime/src/config.rs +59 -60
- data/crates/kobako-wasmtime/src/driver.rs +63 -145
- data/crates/kobako-wasmtime/src/exports.rs +147 -32
- data/crates/kobako-wasmtime/src/guest.rs +44 -0
- data/crates/kobako-wasmtime/src/guest_binary.rs +14 -0
- data/crates/kobako-wasmtime/src/imports.rs +48 -18
- data/crates/kobako-wasmtime/src/instance_pre.rs +7 -7
- data/crates/kobako-wasmtime/src/invocation.rs +93 -51
- data/crates/kobako-wasmtime/src/lib.rs +6 -7
- data/crates/kobako-wasmtime/src/limiter.rs +52 -211
- data/crates/kobako-wasmtime/src/preview1/descriptors.rs +309 -0
- data/crates/kobako-wasmtime/src/preview1/differential/mount.rs +70 -57
- data/crates/kobako-wasmtime/src/preview1/differential.rs +137 -27
- data/crates/kobako-wasmtime/src/preview1/errno.rs +90 -233
- data/crates/kobako-wasmtime/src/preview1/fd.rs +1301 -522
- data/crates/kobako-wasmtime/src/preview1/memory.rs +126 -150
- data/crates/kobako-wasmtime/src/preview1/mount_view/wrap.rs +192 -0
- data/crates/kobako-wasmtime/src/preview1/mount_view.rs +1989 -708
- data/crates/kobako-wasmtime/src/preview1/path.rs +181 -365
- data/crates/kobako-wasmtime/src/preview1/poll.rs +345 -173
- data/crates/kobako-wasmtime/src/preview1/sock.rs +10 -25
- data/crates/kobako-wasmtime/src/preview1/testsuite-expected.txt +6 -0
- data/crates/kobako-wasmtime/src/preview1/testsuite.rs +147 -0
- data/crates/kobako-wasmtime/src/preview1.rs +471 -416
- 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 +3959 -0
- data/crates/kobako-wasmtime/src/preview2/http.rs +1503 -0
- data/crates/kobako-wasmtime/src/preview2/io.rs +315 -0
- data/crates/kobako-wasmtime/src/preview2/sockets.rs +379 -0
- data/crates/kobako-wasmtime/src/preview2/table.rs +305 -0
- data/crates/kobako-wasmtime/src/preview2.rs +57 -0
- data/crates/kobako-wasmtime/src/trap.rs +31 -16
- data/crates/kobako-wasmtime/src/wasi.rs +238 -93
- 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/typenames.witx +750 -0
- data/crates/kobako-wasmtime/witx/wasi_snapshot_preview1.witx +441 -0
- data/data/kobako.wasm +0 -0
- data/ext/kobako/Cargo.toml +1 -1
- data/ext/kobako/src/{runtime/errors.rs → errors.rs} +35 -27
- data/ext/kobako/src/escape.rs +98 -0
- data/ext/kobako/src/{runtime/filesystem → filesystem}/grants.rs +36 -16
- data/ext/kobako/src/filesystem/ruby.rs +689 -0
- data/ext/kobako/src/filesystem.rs +217 -0
- data/ext/kobako/src/gvl.rs +306 -0
- data/ext/kobako/src/lib.rs +64 -3
- data/ext/kobako/src/network/mock.rs +187 -0
- data/ext/kobako/src/network.rs +591 -0
- data/ext/kobako/src/runtime/bridge.rs +31 -30
- data/ext/kobako/src/runtime/snapshot.rs +5 -5
- data/ext/kobako/src/runtime.rs +221 -138
- data/ext/kobako/src/wire.rs +42 -0
- data/lib/kobako/catalog/extensions.rb +19 -7
- data/lib/kobako/catalog/flags.rb +4 -6
- data/lib/kobako/catalog/grants.rb +5 -4
- data/lib/kobako/catalog/handles.rb +9 -31
- data/lib/kobako/catalog/mount.rb +12 -12
- data/lib/kobako/catalog/network.rb +35 -0
- data/lib/kobako/catalog/replacements.rb +28 -0
- data/lib/kobako/catalog/services.rb +7 -21
- data/lib/kobako/catalog/snippets.rb +10 -25
- data/lib/kobako/catalog.rb +4 -1
- data/lib/kobako/codec/{utils.rb → boundary.rb} +5 -3
- data/lib/kobako/codec/decoder.rb +12 -12
- data/lib/kobako/codec/ext_types.rb +5 -7
- data/lib/kobako/codec/handle_walk.rb +5 -47
- data/lib/kobako/codec/nesting.rb +7 -7
- data/lib/kobako/codec/value_budget.rb +134 -42
- data/lib/kobako/codec.rb +1 -1
- data/lib/kobako/context.rb +28 -15
- data/lib/kobako/errors.rb +15 -12
- data/lib/kobako/extension.rb +3 -2
- data/lib/kobako/filesystem.rb +53 -15
- data/lib/kobako/handle.rb +2 -2
- data/lib/kobako/names.rb +28 -0
- data/lib/kobako/network.rb +210 -0
- data/lib/kobako/outcome.rb +7 -7
- data/lib/kobako/payload/arguments.rb +2 -2
- data/lib/kobako/pool.rb +47 -25
- data/lib/kobako/runtime.rb +3 -2
- data/lib/kobako/sandbox.rb +113 -56
- data/lib/kobako/sandbox_options.rb +41 -107
- data/lib/kobako/snippet/bytecode.rb +1 -1
- data/lib/kobako/snippet/source.rb +1 -1
- data/lib/kobako/transport/argument_wrap.rb +64 -0
- data/lib/kobako/transport/block_failure.rb +1 -1
- data/lib/kobako/transport/dispatcher.rb +10 -10
- data/lib/kobako/transport/exposure.rb +28 -17
- data/lib/kobako/transport/reflection.rb +28 -11
- data/lib/kobako/transport/run.rb +13 -28
- data/lib/kobako/transport/yielder.rb +3 -10
- data/lib/kobako/transport.rb +1 -0
- data/lib/kobako/version.rb +1 -1
- data/lib/kobako.rb +38 -0
- data/release-please-config.json +16 -0
- data/sig/core/thread.rbs +6 -0
- data/sig/kobako/catalog/extensions.rbs +5 -3
- data/sig/kobako/catalog/grants.rbs +7 -4
- data/sig/kobako/catalog/handles.rbs +2 -4
- data/sig/kobako/catalog/mount.rbs +3 -5
- data/sig/kobako/catalog/network.rbs +20 -0
- data/sig/kobako/catalog/replacements.rbs +14 -0
- data/sig/kobako/catalog/services.rbs +1 -5
- data/sig/kobako/catalog/snippets.rbs +3 -5
- data/sig/kobako/catalog.rbs +1 -1
- data/sig/kobako/codec/boundary.rbs +9 -0
- data/sig/kobako/codec/decoder.rbs +1 -1
- data/sig/kobako/codec/handle_walk.rbs +0 -6
- data/sig/kobako/codec/nesting.rbs +2 -2
- data/sig/kobako/codec/value_budget.rbs +48 -5
- data/sig/kobako/codec.rbs +1 -2
- data/sig/kobako/context.rbs +4 -2
- data/sig/kobako/errors.rbs +4 -4
- data/sig/kobako/filesystem.rbs +38 -15
- data/sig/kobako/guest_yielder.rbs +1 -1
- data/sig/kobako/network.rbs +115 -0
- data/sig/kobako/outcome.rbs +1 -1
- data/sig/kobako/payload/arguments.rbs +1 -1
- data/sig/kobako/pool.rbs +8 -4
- data/sig/kobako/runtime.rbs +32 -3
- data/sig/kobako/sandbox.rbs +22 -7
- data/sig/kobako/sandbox_options.rbs +29 -38
- data/sig/kobako/transport/argument_wrap.rbs +15 -0
- data/sig/kobako/transport/dispatcher.rbs +2 -2
- data/sig/kobako/transport/error.rbs +1 -1
- data/sig/kobako/transport/exposure.rbs +3 -5
- data/sig/kobako/transport/reflection.rbs +12 -2
- data/sig/kobako/transport/run.rbs +3 -5
- data/sig/kobako/transport/yielder.rbs +0 -3
- data/sig/kobako/transport.rbs +2 -2
- data/sig/kobako.rbs +13 -0
- metadata +131 -34
- data/crates/kobako-runtime/src/filesystem/directory/spelling.rs +0 -194
- data/crates/kobako-runtime/src/filesystem/directory.rs +0 -1082
- data/crates/kobako-runtime/src/filesystem/memory.rs +0 -1100
- data/crates/kobako-runtime/src/filesystem/overlay/exclusive.rs +0 -88
- data/crates/kobako-runtime/src/filesystem/path.rs +0 -60
- data/crates/kobako-runtime/src/filesystem/temporary.rs +0 -167
- data/crates/kobako-wasmtime/src/capture.rs +0 -96
- data/crates/kobako-wasmtime/src/descriptors.rs +0 -167
- data/crates/kobako-wasmtime/src/dispatch.rs +0 -125
- data/crates/kobako-wasmtime/src/guest_mem.rs +0 -271
- data/crates/kobako-wasmtime/src/io.rs +0 -89
- data/crates/kobako-wasmtime/src/preview1/args.rs +0 -60
- data/crates/kobako-wasmtime/src/preview1/beneath.rs +0 -188
- data/crates/kobako-wasmtime/tests/compile_posture.rs +0 -43
- data/crates/kobako-wasmtime/tests/guest_file.rs +0 -1054
- data/crates/kobako-wasmtime/tests/preamble_flags.rs +0 -70
- data/crates/kobako-wasmtime/tests/snippet_compile.rs +0 -95
- data/crates/kobako-wasmtime/tests/support/mod.rs +0 -30
- data/crates/kobako-wasmtime/tests/unanswered_call.rs +0 -86
- data/crates/kobako-wasmtime/tests/unsupported_call.rs +0 -51
- data/ext/kobako/src/runtime/escape.rs +0 -53
- data/ext/kobako/src/runtime/filesystem/ruby.rs +0 -400
- data/ext/kobako/src/runtime/filesystem.rs +0 -236
- data/ext/kobako/src/runtime/gvl.rs +0 -112
- data/lib/kobako/constant_name.rb +0 -8
- data/sig/kobako/codec/utils.rbs +0 -9
- data/sig/kobako/constant_name.rbs +0 -3
- /data/ext/kobako/src/{runtime/pinned_value.rs → pinned_value.rs} +0 -0
|
@@ -9,15 +9,58 @@ module Kobako
|
|
|
9
9
|
|
|
10
10
|
UINT: Hash[Integer, String]
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
FLOAT_FORMATS: Hash[Integer, String]
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
FLOATS: Regexp
|
|
15
|
+
|
|
16
|
+
NAN_ENTRY: Integer
|
|
17
|
+
|
|
18
|
+
def self.assert_within: (String bytes, Integer? budget) -> void
|
|
19
|
+
|
|
20
|
+
class Count
|
|
21
|
+
class OpenContainer < Struct[untyped]
|
|
22
|
+
attr_accessor held: Integer
|
|
23
|
+
attr_accessor keyed: bool
|
|
24
|
+
attr_accessor read: Integer
|
|
25
|
+
attr_accessor nan_keys: Integer
|
|
26
|
+
attr_accessor holds_nan: bool
|
|
27
|
+
|
|
28
|
+
def self.new: (Integer held, bool keyed, Integer read, Integer nan_keys, bool holds_nan) -> OpenContainer
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
@bytes: String
|
|
32
|
+
@budget: Integer
|
|
33
|
+
@remaining: Integer
|
|
34
|
+
@open: Array[OpenContainer]
|
|
35
|
+
|
|
36
|
+
@ended: bool
|
|
37
|
+
|
|
38
|
+
def initialize: (String bytes, Integer budget) -> void
|
|
39
|
+
|
|
40
|
+
def run: () -> void
|
|
15
41
|
|
|
16
|
-
|
|
42
|
+
private
|
|
17
43
|
|
|
18
|
-
|
|
44
|
+
def count_value: (Integer pos, Integer children, bool keyed) -> void
|
|
45
|
+
|
|
46
|
+
def close_value: (bool holds_nan) -> void
|
|
47
|
+
|
|
48
|
+
def charge_key: (OpenContainer map) -> void
|
|
49
|
+
|
|
50
|
+
def spend: (Integer values) -> void
|
|
51
|
+
|
|
52
|
+
def nan?: (Integer pos) -> bool
|
|
53
|
+
|
|
54
|
+
def step: (Integer pos) -> [Integer?, Integer, bool]
|
|
55
|
+
|
|
56
|
+
def step_framed: (Integer pos, Integer marker) -> [Integer?, Integer, bool]
|
|
57
|
+
|
|
58
|
+
def uint: (Integer pos, Integer width) -> Integer
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
private
|
|
19
62
|
|
|
20
|
-
def self.
|
|
63
|
+
def self.within_by_size?: (String bytes, Integer budget) -> bool
|
|
21
64
|
end
|
|
22
65
|
end
|
|
23
66
|
end
|
data/sig/kobako/codec.rbs
CHANGED
|
@@ -2,8 +2,7 @@ module Kobako
|
|
|
2
2
|
module Codec
|
|
3
3
|
MAX_NESTING_DEPTH: Integer
|
|
4
4
|
|
|
5
|
-
# A value in the closed wire type set
|
|
6
|
-
# § Type Mapping): the scalar leaves, a Capability Handle, and Array / Hash
|
|
5
|
+
# A value in the closed wire type set: the scalar leaves, a Capability Handle, and Array / Hash
|
|
7
6
|
# containers of the same. The by-value payloads that cross the wire —
|
|
8
7
|
# dispatch arguments and success values — inhabit this type; a Fault is
|
|
9
8
|
# an envelope shape, not a wire_value.
|
data/sig/kobako/context.rbs
CHANGED
|
@@ -2,7 +2,7 @@ module Kobako
|
|
|
2
2
|
class Context
|
|
3
3
|
type preamble = [Array[String], Array[Kobako::Catalog::Snippets::tuple], Array[Kobako::Catalog::Flags::tuple]]
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@replacements: Kobako::Catalog::Replacements
|
|
6
6
|
|
|
7
7
|
def initialize: (
|
|
8
8
|
runtime: Kobako::Runtime,
|
|
@@ -16,6 +16,8 @@ module Kobako
|
|
|
16
16
|
|
|
17
17
|
def mount: (String at, Kobako::Filesystem::mountable filesystem, ?access: Kobako::Filesystem::access) ?{ (String path, Kobako::Filesystem::access access) -> boolish } -> self
|
|
18
18
|
|
|
19
|
+
def network: (Symbol | String name, ?untyped entry) ?{ (Kobako::Network::Builder) -> void } -> self
|
|
20
|
+
|
|
19
21
|
def lookup: (Symbol | String path) -> Kobako::Transport::Exposure
|
|
20
22
|
|
|
21
23
|
def eval: (String code) ?{ (Kobako::Context) -> void } -> Kobako::Execution
|
|
@@ -38,6 +40,6 @@ module Kobako
|
|
|
38
40
|
|
|
39
41
|
def settle_outcome: (Kobako::Snapshot snapshot, Symbol verb, Symbol? entrypoint) -> Kobako::Execution
|
|
40
42
|
|
|
41
|
-
def invoke
|
|
43
|
+
def invoke: (Symbol verb, ?entrypoint: Symbol?) { () -> Kobako::Snapshot } -> Kobako::Execution
|
|
42
44
|
end
|
|
43
45
|
end
|
data/sig/kobako/errors.rbs
CHANGED
|
@@ -21,18 +21,18 @@ module Kobako
|
|
|
21
21
|
class SetupError < Error
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
class
|
|
24
|
+
class GuestBinaryNotFoundError < SetupError
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
module Diagnosable : Error
|
|
28
28
|
attr_reader origin: String?
|
|
29
|
-
attr_reader
|
|
29
|
+
attr_reader class_name: String?
|
|
30
30
|
attr_reader backtrace_lines: Array[String]?
|
|
31
31
|
|
|
32
32
|
def initialize: (
|
|
33
33
|
String message,
|
|
34
34
|
?origin: String?,
|
|
35
|
-
?
|
|
35
|
+
?class_name: String?,
|
|
36
36
|
?backtrace_lines: Array[String]?
|
|
37
37
|
) -> void
|
|
38
38
|
end
|
|
@@ -81,7 +81,7 @@ module Kobako
|
|
|
81
81
|
?name: Symbol?,
|
|
82
82
|
?available: Array[Symbol],
|
|
83
83
|
?origin: String?,
|
|
84
|
-
?
|
|
84
|
+
?class_name: String?,
|
|
85
85
|
?backtrace_lines: Array[String]?
|
|
86
86
|
) -> void
|
|
87
87
|
end
|
data/sig/kobako/filesystem.rbs
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
module Kobako
|
|
2
2
|
module Filesystem
|
|
3
|
-
type mountable =
|
|
3
|
+
type mountable = Tmpfs | Bind | Overlay | _Readable
|
|
4
4
|
|
|
5
5
|
type access = :read | :read_write
|
|
6
6
|
|
|
7
|
+
def self.validate_mount: (untyped at, untyped access, untyped filesystem) -> nil
|
|
8
|
+
|
|
7
9
|
# What a Filesystem written in Ruby answers to be mounted. One that
|
|
8
10
|
# also answers _Listable lists its directories, and one answering
|
|
9
11
|
# _Writable takes changes too; each method it lacks is refused alone.
|
|
12
|
+
# One answering _Exclusive vouches only the guest changes it.
|
|
10
13
|
interface _Readable
|
|
11
14
|
def open: (String path, Integer flags) -> _File
|
|
12
15
|
def stat: (String path) -> _Stat
|
|
13
16
|
end
|
|
14
17
|
|
|
18
|
+
interface _Exclusive
|
|
19
|
+
def exclusive?: () -> boolish
|
|
20
|
+
end
|
|
21
|
+
|
|
15
22
|
interface _Listable
|
|
16
23
|
def children: (String path) -> Array[String]
|
|
17
24
|
end
|
|
@@ -20,13 +27,14 @@ module Kobako
|
|
|
20
27
|
def mkdir: (String path) -> void
|
|
21
28
|
def rmdir: (String path) -> void
|
|
22
29
|
def unlink: (String path) -> void
|
|
23
|
-
def rename: (String from, String to
|
|
30
|
+
def rename: (String from, String to) -> void
|
|
24
31
|
end
|
|
25
32
|
|
|
26
33
|
# A file a Filesystem written in Ruby opened; +::File+ answers it. One
|
|
27
34
|
# that also answers _WritableFile takes writes too, one answering
|
|
28
35
|
# _AppendableFile takes appends, and any file may answer _SyncableFile
|
|
29
|
-
# to flush or
|
|
36
|
+
# to flush, _ClosableFile to close, or _StatableFile to report its times
|
|
37
|
+
# and count of names.
|
|
30
38
|
interface _File
|
|
31
39
|
def pread: (Integer length, Integer offset) -> String?
|
|
32
40
|
def size: () -> Integer
|
|
@@ -51,9 +59,15 @@ module Kobako
|
|
|
51
59
|
def close: () -> void
|
|
52
60
|
end
|
|
53
61
|
|
|
62
|
+
interface _StatableFile
|
|
63
|
+
def stat: () -> _Stat
|
|
64
|
+
end
|
|
65
|
+
|
|
54
66
|
# What a Filesystem written in Ruby's +stat+ answers, as +File::Stat+
|
|
55
67
|
# does; an +ino+ of zero names no identity. One that also answers
|
|
56
|
-
# _StatDevice names the device its +ino+ belongs to
|
|
68
|
+
# _StatDevice names the device its +ino+ belongs to, _StatKind says a
|
|
69
|
+
# special file is one, _StatTimes gives its times, and _StatLinks its
|
|
70
|
+
# count of names.
|
|
57
71
|
interface _Stat
|
|
58
72
|
def directory?: () -> boolish
|
|
59
73
|
def size: () -> Integer
|
|
@@ -64,24 +78,33 @@ module Kobako
|
|
|
64
78
|
def dev: () -> Integer
|
|
65
79
|
end
|
|
66
80
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
# cannot key by String; a Symbol keyword past +limit+ and +inodes+
|
|
70
|
-
# raises ArgumentError.
|
|
71
|
-
def initialize: (?Hash[String, String] files, ?limit: Integer?, ?inodes: Integer?, **String) -> void
|
|
81
|
+
interface _StatKind
|
|
82
|
+
def ftype: () -> String
|
|
72
83
|
end
|
|
73
84
|
|
|
74
|
-
|
|
75
|
-
def
|
|
85
|
+
interface _StatTimes
|
|
86
|
+
def atime: () -> Time
|
|
87
|
+
def mtime: () -> Time
|
|
88
|
+
def ctime: () -> Time
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
interface _StatLinks
|
|
92
|
+
def nlink: () -> Integer
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
class Tmpfs
|
|
96
|
+
# A bare <tt>"path" => contents</tt> arrives as keywords, which RBS
|
|
97
|
+
# cannot key by String; a Symbol keyword past +size+ and +nr_inodes+
|
|
98
|
+
# raises ArgumentError.
|
|
99
|
+
def initialize: (?Hash[String, String] files, ?size: Integer?, ?nr_inodes: Integer?, **String) -> void
|
|
76
100
|
end
|
|
77
101
|
|
|
78
|
-
class
|
|
79
|
-
def initialize: (String path) -> void
|
|
102
|
+
class Bind
|
|
103
|
+
def initialize: (String path, ?exclusive: bool) -> void
|
|
80
104
|
end
|
|
81
105
|
|
|
82
106
|
class Overlay
|
|
83
|
-
def initialize: () -> void
|
|
84
|
-
def layer: (mountable filesystem, ?access: access) -> Overlay
|
|
107
|
+
def initialize: (lower: Array[mountable], ?upper: Tmpfs?) -> void
|
|
85
108
|
end
|
|
86
109
|
|
|
87
110
|
end
|
|
@@ -2,7 +2,7 @@ module Kobako
|
|
|
2
2
|
# Frame-scoped guest re-entry handle the ext hands the dispatch Proc as
|
|
3
3
|
# its last argument — the production conformer of
|
|
4
4
|
# +Kobako::Transport::_GuestYielder+, answering the Yield Reply already
|
|
5
|
-
# split off the
|
|
5
|
+
# split off the Envelope.
|
|
6
6
|
class GuestYielder
|
|
7
7
|
def call: (String args_bytes) -> [Symbol, String, String?]
|
|
8
8
|
end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
module Kobako
|
|
2
|
+
module Network
|
|
3
|
+
type protocol = :http | :tcp | :udp
|
|
4
|
+
|
|
5
|
+
UNWRITTEN: Object
|
|
6
|
+
|
|
7
|
+
def self.normalize_endpoint: (untyped host, untyped port, Hash[Symbol, untyped] written) ->
|
|
8
|
+
[String, Integer, protocol, Array[Symbol | String | IPAddr], Array[HttpRule]]
|
|
9
|
+
|
|
10
|
+
def self.normalize_rule: (bool allow, untyped method, untyped path) -> [bool, String?, String]
|
|
11
|
+
|
|
12
|
+
def self.normalize_credential: (Symbol | String placement, untyped placeholder) -> String
|
|
13
|
+
|
|
14
|
+
def self.validate_name: (String name) -> nil
|
|
15
|
+
|
|
16
|
+
class Mock
|
|
17
|
+
def initialize: (?local_addresses: Array[String]?) -> void
|
|
18
|
+
|
|
19
|
+
def resolve: (String name, to: String | Array[String]) -> nil
|
|
20
|
+
|
|
21
|
+
def route: (String address, Integer port, to: [String, Integer], ?protocol: :tcp | :udp) -> nil
|
|
22
|
+
|
|
23
|
+
def refuse: (String address, Integer port, singleton(SystemCallError) errno, ?protocol: :tcp | :udp) -> nil
|
|
24
|
+
|
|
25
|
+
def hold: [T] (String name) { () -> T } -> T
|
|
26
|
+
|
|
27
|
+
def lookups: () -> Array[String]
|
|
28
|
+
|
|
29
|
+
def dialed_addresses: () -> Array[[String, Integer]]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class Endpoint < Data
|
|
33
|
+
attr_reader host: String
|
|
34
|
+
attr_reader port: Integer
|
|
35
|
+
attr_reader protocol: protocol
|
|
36
|
+
attr_reader addresses: Array[Symbol | String | IPAddr]
|
|
37
|
+
attr_reader rules: Array[HttpRule]
|
|
38
|
+
|
|
39
|
+
def self.new: (host: untyped, port: untyped, ?protocol: untyped, ?addresses: untyped, ?rules: untyped) -> Endpoint
|
|
40
|
+
|
|
41
|
+
def initialize: (host: untyped, port: untyped, ?protocol: untyped, ?addresses: untyped, ?rules: untyped) -> void
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
class Connection < Data
|
|
45
|
+
attr_reader host: String
|
|
46
|
+
attr_reader port: Integer
|
|
47
|
+
attr_reader protocol: protocol
|
|
48
|
+
|
|
49
|
+
def self.new: (host: String, port: Integer, protocol: protocol) -> Connection
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
class HttpRule
|
|
53
|
+
@allow: bool
|
|
54
|
+
|
|
55
|
+
def allow?: () -> bool
|
|
56
|
+
attr_reader method: String?
|
|
57
|
+
attr_reader path: String
|
|
58
|
+
|
|
59
|
+
def initialize: (allow: boolish, method: untyped, path: untyped) -> void
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
class Rules
|
|
63
|
+
@rules: Array[HttpRule]
|
|
64
|
+
|
|
65
|
+
def initialize: () -> void
|
|
66
|
+
|
|
67
|
+
def allow: (untyped method, untyped path) -> self
|
|
68
|
+
|
|
69
|
+
def deny: (untyped method, untyped path) -> self
|
|
70
|
+
|
|
71
|
+
def to_a: () -> Array[HttpRule]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
class Credential
|
|
75
|
+
@source: ^(Request) -> String?
|
|
76
|
+
|
|
77
|
+
attr_reader placement: Symbol | String
|
|
78
|
+
attr_reader placeholder: String
|
|
79
|
+
|
|
80
|
+
def initialize: (Symbol | String placement, placeholder: untyped) ?{ (Request) -> String? } -> void
|
|
81
|
+
|
|
82
|
+
def value: (Request request) -> String?
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class Request
|
|
86
|
+
attr_reader host: String
|
|
87
|
+
attr_reader port: Integer
|
|
88
|
+
attr_reader method: String
|
|
89
|
+
attr_reader scheme: String
|
|
90
|
+
attr_reader path: String
|
|
91
|
+
attr_reader header_names: Array[String]
|
|
92
|
+
|
|
93
|
+
def initialize: ([String, Integer] authority, String method, String scheme, String path, Array[String] header_names) -> void
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
class Builder
|
|
97
|
+
HOOKS: Array[Symbol]
|
|
98
|
+
|
|
99
|
+
@entry: untyped
|
|
100
|
+
@endpoints: Array[Endpoint]
|
|
101
|
+
@policies: Hash[Symbol, Array[^(untyped) -> boolish]]
|
|
102
|
+
@credentials: Array[Credential]
|
|
103
|
+
|
|
104
|
+
def initialize: (?untyped entry) -> void
|
|
105
|
+
|
|
106
|
+
def credential: (Symbol | String placement, placeholder: untyped) ?{ (Request) -> String? } -> self
|
|
107
|
+
|
|
108
|
+
def endpoint: (untyped host, port: untyped, ?protocol: untyped, ?addresses: untyped) ?{ (Rules) -> void } -> self
|
|
109
|
+
|
|
110
|
+
def policy: (Symbol hook) ?{ (untyped) -> boolish } -> self
|
|
111
|
+
|
|
112
|
+
def to_native: () -> [untyped, Array[Endpoint], Array[Credential], Hash[Symbol, Array[^(untyped) -> boolish]]]
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
data/sig/kobako/outcome.rbs
CHANGED
|
@@ -12,7 +12,7 @@ module Kobako
|
|
|
12
12
|
|
|
13
13
|
def self.panic_error: (panic_fields panic, Symbol? entrypoint) -> (SandboxError | ServiceError)
|
|
14
14
|
|
|
15
|
-
def self.error_class: (String origin, String
|
|
15
|
+
def self.error_class: (String origin, String class_name) -> (singleton(SandboxError) | singleton(ServiceError))
|
|
16
16
|
|
|
17
17
|
def self.decode_value: (String payload) -> Kobako::Codec::wire_value
|
|
18
18
|
|
data/sig/kobako/pool.rbs
CHANGED
|
@@ -2,7 +2,9 @@ module Kobako
|
|
|
2
2
|
class Pool
|
|
3
3
|
DEFAULT_CHECKOUT_TIMEOUT_SECONDS: Float
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
DEPRECATION: String
|
|
6
|
+
|
|
7
|
+
@size: Integer
|
|
6
8
|
@checkout_timeout: Float?
|
|
7
9
|
@sandbox_options: Hash[Symbol, untyped]
|
|
8
10
|
@setup: ^(Kobako::Sandbox) -> void | nil
|
|
@@ -12,7 +14,7 @@ module Kobako
|
|
|
12
14
|
@slot_freed: Thread::ConditionVariable
|
|
13
15
|
|
|
14
16
|
def initialize: (
|
|
15
|
-
|
|
17
|
+
size: Integer,
|
|
16
18
|
?checkout_timeout: (Float | Integer)?,
|
|
17
19
|
**untyped sandbox_options
|
|
18
20
|
) ?{ (Kobako::Sandbox) -> void } -> void
|
|
@@ -25,17 +27,19 @@ module Kobako
|
|
|
25
27
|
|
|
26
28
|
def claim_or_wait: (Float? deadline) -> [Symbol, Kobako::Sandbox?]
|
|
27
29
|
|
|
28
|
-
def await_slot
|
|
30
|
+
def await_slot: (Float? deadline) -> void
|
|
29
31
|
|
|
30
32
|
def construct_slot: () -> Kobako::Sandbox
|
|
31
33
|
|
|
34
|
+
def build_slot: () -> Kobako::Sandbox
|
|
35
|
+
|
|
32
36
|
def checkin: (Kobako::Sandbox sandbox) -> void
|
|
33
37
|
|
|
34
38
|
def release_capacity: () -> void
|
|
35
39
|
|
|
36
40
|
def monotonic_now: () -> Float
|
|
37
41
|
|
|
38
|
-
def
|
|
42
|
+
def validate_size: (untyped size) -> void
|
|
39
43
|
|
|
40
44
|
def normalize_checkout_timeout: ((Float | Integer)? checkout_timeout) -> Float?
|
|
41
45
|
end
|
data/sig/kobako/runtime.rbs
CHANGED
|
@@ -2,7 +2,32 @@ module Kobako
|
|
|
2
2
|
class Runtime
|
|
3
3
|
def self.default_path: () -> String
|
|
4
4
|
|
|
5
|
-
def self.
|
|
5
|
+
def self.default_options: () -> {
|
|
6
|
+
timeout: Float?,
|
|
7
|
+
setup_timeout: Float?,
|
|
8
|
+
memory_limit: Integer?,
|
|
9
|
+
stdout_limit: Integer?,
|
|
10
|
+
stderr_limit: Integer?,
|
|
11
|
+
open_file_limit: Integer?,
|
|
12
|
+
open_connection_limit: Integer?,
|
|
13
|
+
connection_limit: Integer?,
|
|
14
|
+
profile: Symbol,
|
|
15
|
+
gvl: Symbol,
|
|
16
|
+
network: nil
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
def self.normalize_caps: (Hash[Symbol, untyped] caps) -> {
|
|
20
|
+
timeout: Float?,
|
|
21
|
+
setup_timeout: Float?,
|
|
22
|
+
memory_limit: Integer?,
|
|
23
|
+
stdout_limit: Integer?,
|
|
24
|
+
stderr_limit: Integer?,
|
|
25
|
+
open_file_limit: Integer?,
|
|
26
|
+
open_connection_limit: Integer?,
|
|
27
|
+
connection_limit: Integer?
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
def self.value_budget_of: (Integer? memory_limit) -> Integer?
|
|
6
31
|
|
|
7
32
|
def self.from_path: (
|
|
8
33
|
String path,
|
|
@@ -12,15 +37,19 @@ module Kobako
|
|
|
12
37
|
stdout_limit: Integer?,
|
|
13
38
|
stderr_limit: Integer?,
|
|
14
39
|
open_file_limit: Integer?,
|
|
40
|
+
open_connection_limit: Integer?,
|
|
41
|
+
connection_limit: Integer?,
|
|
15
42
|
profile: Symbol,
|
|
16
|
-
gvl: Symbol
|
|
43
|
+
gvl: Symbol,
|
|
44
|
+
network: Network::Mock?
|
|
17
45
|
) -> Runtime
|
|
18
46
|
|
|
19
47
|
type setup = [
|
|
20
48
|
Array[String],
|
|
21
49
|
Array[Kobako::Catalog::Snippets::tuple],
|
|
22
50
|
Array[Kobako::Catalog::Flags::tuple],
|
|
23
|
-
Array[Kobako::Catalog::Mount::tuple]
|
|
51
|
+
Array[Kobako::Catalog::Mount::tuple],
|
|
52
|
+
Array[Kobako::Catalog::Network::tuple]
|
|
24
53
|
]
|
|
25
54
|
|
|
26
55
|
def eval: (Kobako::Transport::dispatch_proc dispatch, setup setup, String source) -> Kobako::Snapshot
|
data/sig/kobako/sandbox.rbs
CHANGED
|
@@ -12,11 +12,14 @@ module Kobako
|
|
|
12
12
|
def stdout_limit: () -> Integer?
|
|
13
13
|
def stderr_limit: () -> Integer?
|
|
14
14
|
def open_file_limit: () -> Integer?
|
|
15
|
+
def open_connection_limit: () -> Integer?
|
|
16
|
+
def connection_limit: () -> Integer?
|
|
15
17
|
def profile: () -> Symbol
|
|
16
18
|
def gvl: () -> Symbol
|
|
17
19
|
|
|
18
|
-
# Every keyword beyond wasm_path
|
|
19
|
-
# SandboxOptions.new
|
|
20
|
+
# Every keyword beyond wasm_path lands on the runtime's defaults for
|
|
21
|
+
# SandboxOptions.new; the runtime judges the profile, the mode, and the
|
|
22
|
+
# floor.
|
|
20
23
|
def initialize: (
|
|
21
24
|
?wasm_path: String?,
|
|
22
25
|
**untyped options
|
|
@@ -28,6 +31,8 @@ module Kobako
|
|
|
28
31
|
|
|
29
32
|
def mount: (String at, Kobako::Filesystem::mountable filesystem, ?access: Kobako::Filesystem::access) ?{ (String path, Kobako::Filesystem::access access) -> boolish } -> Kobako::Sandbox
|
|
30
33
|
|
|
34
|
+
def network: (Symbol | String name, ?untyped entry) ?{ (Kobako::Network::Builder) -> void } -> Kobako::Sandbox
|
|
35
|
+
|
|
31
36
|
def preload: (code: String, name: Symbol | String) -> Kobako::Sandbox
|
|
32
37
|
| (binary: String) -> Kobako::Sandbox
|
|
33
38
|
|
|
@@ -39,14 +44,24 @@ module Kobako
|
|
|
39
44
|
|
|
40
45
|
private
|
|
41
46
|
|
|
42
|
-
def build_runtime
|
|
43
|
-
|
|
44
|
-
def new_invocation: () -> Kobako::Context
|
|
47
|
+
def build_runtime: () -> Kobako::Runtime
|
|
45
48
|
|
|
46
49
|
def preamble: (Array[Kobako::Catalog::Snippets::tuple] snippets) -> Kobako::Context::preamble
|
|
47
50
|
|
|
48
|
-
def refuse_once_invoked
|
|
51
|
+
def refuse_once_invoked: (String verb) -> void
|
|
52
|
+
|
|
53
|
+
def seal: (String reason) -> String
|
|
54
|
+
|
|
55
|
+
def begin_invocation: () -> Kobako::Context
|
|
56
|
+
|
|
57
|
+
def warn_release_on_main_thread: () -> void
|
|
58
|
+
|
|
59
|
+
module MainThreadRelease
|
|
60
|
+
MESSAGE: String
|
|
61
|
+
|
|
62
|
+
self.@warned: bool
|
|
49
63
|
|
|
50
|
-
|
|
64
|
+
def self.warn_once: () -> void
|
|
65
|
+
end
|
|
51
66
|
end
|
|
52
67
|
end
|
|
@@ -1,45 +1,43 @@
|
|
|
1
1
|
module Kobako
|
|
2
2
|
class SandboxOptions < Data
|
|
3
|
-
DEFAULT_TIMEOUT_SECONDS: Float
|
|
4
|
-
DEFAULT_SETUP_TIMEOUT_SECONDS: Float
|
|
5
|
-
DEFAULT_MEMORY_LIMIT: Integer
|
|
6
|
-
DEFAULT_OUTPUT_LIMIT: Integer
|
|
7
|
-
DEFAULT_OPEN_FILE_LIMIT: Integer
|
|
8
|
-
DEFAULT_PROFILE: Symbol
|
|
9
|
-
PROFILES: Array[Symbol]
|
|
10
|
-
GVL_MODES: Array[Symbol]
|
|
11
|
-
DEFAULT_GVL: Symbol
|
|
12
|
-
VALUE_BYTES: Integer
|
|
13
|
-
|
|
14
3
|
attr_reader timeout: Float?
|
|
15
4
|
attr_reader setup_timeout: Float?
|
|
16
5
|
attr_reader memory_limit: Integer?
|
|
17
6
|
attr_reader stdout_limit: Integer?
|
|
18
7
|
attr_reader stderr_limit: Integer?
|
|
19
8
|
attr_reader open_file_limit: Integer?
|
|
9
|
+
attr_reader open_connection_limit: Integer?
|
|
10
|
+
attr_reader connection_limit: Integer?
|
|
20
11
|
attr_reader profile: Symbol
|
|
21
12
|
attr_reader gvl: Symbol
|
|
13
|
+
attr_reader network: Network::Mock?
|
|
22
14
|
|
|
23
15
|
def self.new: (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
timeout: (Float | Integer)?,
|
|
17
|
+
setup_timeout: (Float | Integer)?,
|
|
18
|
+
memory_limit: Integer?,
|
|
19
|
+
stdout_limit: Integer?,
|
|
20
|
+
stderr_limit: Integer?,
|
|
21
|
+
open_file_limit: Integer?,
|
|
22
|
+
open_connection_limit: Integer?,
|
|
23
|
+
connection_limit: Integer?,
|
|
24
|
+
profile: Symbol,
|
|
25
|
+
gvl: Symbol,
|
|
26
|
+
network: Network::Mock?
|
|
32
27
|
) -> SandboxOptions
|
|
33
28
|
|
|
34
29
|
def initialize: (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
timeout: (Float | Integer)?,
|
|
31
|
+
setup_timeout: (Float | Integer)?,
|
|
32
|
+
memory_limit: Integer?,
|
|
33
|
+
stdout_limit: Integer?,
|
|
34
|
+
stderr_limit: Integer?,
|
|
35
|
+
open_file_limit: Integer?,
|
|
36
|
+
open_connection_limit: Integer?,
|
|
37
|
+
connection_limit: Integer?,
|
|
38
|
+
profile: Symbol,
|
|
39
|
+
gvl: Symbol,
|
|
40
|
+
network: Network::Mock?
|
|
43
41
|
) -> void
|
|
44
42
|
|
|
45
43
|
def to_h: () -> {
|
|
@@ -49,20 +47,13 @@ module Kobako
|
|
|
49
47
|
stdout_limit: Integer?,
|
|
50
48
|
stderr_limit: Integer?,
|
|
51
49
|
open_file_limit: Integer?,
|
|
50
|
+
open_connection_limit: Integer?,
|
|
51
|
+
connection_limit: Integer?,
|
|
52
52
|
profile: Symbol,
|
|
53
|
-
gvl: Symbol
|
|
53
|
+
gvl: Symbol,
|
|
54
|
+
network: Network::Mock?
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
def value_budget: () -> Integer?
|
|
57
|
-
|
|
58
|
-
def enforce_floor!: (Symbol declared) -> void
|
|
59
|
-
|
|
60
|
-
private
|
|
61
|
-
|
|
62
|
-
def normalize_timeout: ((Float | Integer)? timeout, String name) -> Float?
|
|
63
|
-
|
|
64
|
-
def normalize_limit: (Integer? limit, String name) -> Integer?
|
|
65
|
-
|
|
66
|
-
def normalize_choice: (untyped value, Array[Symbol] choices, String name) -> Symbol
|
|
67
58
|
end
|
|
68
59
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Kobako
|
|
2
|
+
module Transport
|
|
3
|
+
module ArgumentWrap
|
|
4
|
+
def self.wrap: (untyped value, Kobako::Codec::_HandleTable handles, ?Integer depth) -> untyped
|
|
5
|
+
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
def self.refuse_past_nesting: (Integer depth) -> void
|
|
9
|
+
|
|
10
|
+
def self.wrap_leaf: (untyped value, Kobako::Codec::_HandleTable handles) -> untyped
|
|
11
|
+
|
|
12
|
+
def self.wrap_hash: (Hash[untyped, untyped] hash, Kobako::Codec::_HandleTable handles, Integer depth) -> Hash[untyped, untyped]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -21,11 +21,11 @@ module Kobako
|
|
|
21
21
|
|
|
22
22
|
def self.resolve_call_args: (Kobako::Payload::Arguments arguments, Kobako::Codec::_HandleTable handles, bool carried_handle) -> [Array[untyped], Hash[Symbol, untyped]]
|
|
23
23
|
|
|
24
|
-
def self.
|
|
24
|
+
def self.fault_of: (StandardError error, Kobako::Transport::BlockFailure failure) -> [String, String]
|
|
25
25
|
|
|
26
26
|
def self.invoke: (Kobako::Transport::Exposure exposure, String method, Array[untyped] args, Hash[Symbol, untyped] kwargs, Kobako::Transport::Yielder? yielder) -> untyped
|
|
27
27
|
|
|
28
|
-
def self.reject_unreachable
|
|
28
|
+
def self.reject_unreachable: (Kobako::Transport::Exposure exposure, Symbol name) -> void
|
|
29
29
|
|
|
30
30
|
def self.resolve_arg: (untyped value, Kobako::Codec::_HandleTable handles) -> untyped
|
|
31
31
|
|