kobako 0.8.0-aarch64-linux → 0.9.1-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +46 -0
- data/README.md +3 -1
- data/data/kobako.wasm +0 -0
- data/lib/kobako/3.3/kobako.so +0 -0
- data/lib/kobako/3.4/kobako.so +0 -0
- data/lib/kobako/4.0/kobako.so +0 -0
- data/lib/kobako/catalog/namespaces.rb +3 -2
- data/lib/kobako/codec/factory.rb +2 -5
- data/lib/kobako/codec/utils.rb +11 -15
- data/lib/kobako/errors.rb +3 -3
- data/lib/kobako/fault.rb +2 -4
- data/lib/kobako/sandbox.rb +3 -3
- data/lib/kobako/transport/dispatcher.rb +33 -3
- data/lib/kobako/usage.rb +2 -4
- data/lib/kobako/version.rb +1 -1
- data/release-please-config.json +64 -1
- data/rust-toolchain.toml +2 -1
- data/sig/kobako/codec.rbs +4 -0
- data/sig/kobako/transport/dispatcher.rbs +4 -0
- data/sig/kobako/version.rbs +3 -0
- data/sig/kobako.rbs +0 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f31e6faf20baeecb7906b6b8a2ea2ec2239f4d0e2beb1e7487fcefd3a3bb59bf
|
|
4
|
+
data.tar.gz: f306d3f1c450feefba4a59ce04521230eef565297ba9cbe45a4448bb8db8dfb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81569f251e38597b6e6e91a617012550505bf705d68cd361d078e14686d2a7b73d0727f5ff1a25f2dfdcbc0364de3146ac831c5eb29535a7f48c47a2160ca680
|
|
7
|
+
data.tar.gz: 4e74f59fbeb8466e9dae194e0cda8951198d3a2314ef55c572c6bdad2029d5b273222f6245a60f3d149dce76da58b4d7d904eea82c8a2996e292c8a73514b634
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{".":"0.
|
|
1
|
+
{".":"0.9.1","wasm/kobako-core":"0.4.0","wasm/kobako":"0.4.0","wasm/kobako-io":"0.4.0","wasm/kobako-regexp":"0.4.0"}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.1](https://github.com/elct9620/kobako/compare/v0.9.0...v0.9.1) (2026-06-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **transport:** block ambient reflection in guest dispatch (GHSA-7pwq-q9jf-539h) ([dd08166](https://github.com/elct9620/kobako/commit/dd081665f368f7ba54e476c3ad045ee1aa8ed703))
|
|
9
|
+
|
|
10
|
+
## [0.9.0](https://github.com/elct9620/kobako/compare/v0.8.0...v0.9.0) (2026-06-10)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **regexp:** add Kernel#=~ fallback returning nil ([d461781](https://github.com/elct9620/kobako/commit/d4617815b8e888a09a548c7f4664819cdddc34c8))
|
|
16
|
+
* **regexp:** add regexp-aware String#[]= ([34807f5](https://github.com/elct9620/kobako/commit/34807f5ba5f6e17efff27af3c5c24ae42b0b651d))
|
|
17
|
+
* **regexp:** add Regexp.last_match and last_match= ([03649e8](https://github.com/elct9620/kobako/commit/03649e81cfda0c43ac22777f70ea38a0ac4a93c7))
|
|
18
|
+
* **regexp:** add Regexp#named_captures and #names ([7cf018d](https://github.com/elct9620/kobako/commit/7cf018d39529be1d1384297b1b38b9d1670523e7))
|
|
19
|
+
* **regexp:** add String#slice! ([2857e0e](https://github.com/elct9620/kobako/commit/2857e0ee55df9f6295a25391ff76613b8dd5d555))
|
|
20
|
+
* **regexp:** align Regexp#match position handling with MRI ([c448c94](https://github.com/elct9620/kobako/commit/c448c9402a5a78076b5a81be0e07b7e1c90b1014))
|
|
21
|
+
* **regexp:** align Regexp#to_s flag rendering with MRI ([67d0414](https://github.com/elct9620/kobako/commit/67d04145f116a72a0f84d0ddf6674559e97046e8))
|
|
22
|
+
* **regexp:** copy the compiled pattern on Regexp dup/clone ([be97ea1](https://github.com/elct9620/kobako/commit/be97ea1cbd9556196f06229cd17d0288c062f133))
|
|
23
|
+
* **regexp:** copy the match snapshot on MatchData dup/clone ([0719d99](https://github.com/elct9620/kobako/commit/0719d99c41df9ddc8905580d61b32f0e6d88b6ba))
|
|
24
|
+
* **regexp:** define RegexpError in the gem instead of borrowing it ([ca57ca6](https://github.com/elct9620/kobako/commit/ca57ca6effb93ad05a175f2641f4b15aa971e31c))
|
|
25
|
+
* **regexp:** escape the source in Regexp#inspect ([9142d6c](https://github.com/elct9620/kobako/commit/9142d6cd32e08271639548af7801284e5d198892))
|
|
26
|
+
* **regexp:** expand backreferences and Hash in gsub/sub replacements ([8a0bc2d](https://github.com/elct9620/kobako/commit/8a0bc2dda8fb46a91fb1a5ee1c7482d6da9dffee))
|
|
27
|
+
* **regexp:** forbid MatchData.new ([5e2b3f5](https://github.com/elct9620/kobako/commit/5e2b3f527ff68dd118c370bb1b0bd01bf3dc4f8f))
|
|
28
|
+
* **regexp:** honour MatchData#named_captures(symbolize_names:) ([2a754d3](https://github.com/elct9620/kobako/commit/2a754d3d2ca3d4159471c8f9d17cc71ac59e0543))
|
|
29
|
+
* **regexp:** honour the position argument in String#index ([4dfbb41](https://github.com/elct9620/kobako/commit/4dfbb41086b302eada56efea4cbbfd6579adbdab))
|
|
30
|
+
* **regexp:** memoize compiled patterns per invocation ([f764d66](https://github.com/elct9620/kobako/commit/f764d66a574da51b9e714db1ae6d917cce4cf611))
|
|
31
|
+
* **regexp:** raise IndexError for out-of-range MatchData#begin/#end/#offset ([85fc8d6](https://github.com/elct9620/kobako/commit/85fc8d67d0fcc137a7f43695ead34317d557ec1a))
|
|
32
|
+
* **regexp:** reproduce the C match-family operand handling ([9e30d2d](https://github.com/elct9620/kobako/commit/9e30d2d6d6ddd42c84d5e2fb55cc2c06076c4fd4))
|
|
33
|
+
* **regexp:** set the $+ last-group match global ([b65a424](https://github.com/elct9620/kobako/commit/b65a42434b2edd5b01ed879b09895d17ff778888))
|
|
34
|
+
* **regexp:** support length and Range forms of MatchData#[] ([7ac4dee](https://github.com/elct9620/kobako/commit/7ac4deec79a215b35fdc2786522145ce6d34263c))
|
|
35
|
+
* **regexp:** yield the MatchData to a block in Regexp#match / String#match ([f5a6e53](https://github.com/elct9620/kobako/commit/f5a6e53ec5993237805c2360fa70684f84acf6b8))
|
|
36
|
+
* **wasm:** split the Guest Binary into a pure default and regexp variants ([21695b1](https://github.com/elct9620/kobako/commit/21695b1cd527e334c68f9730f01f92fef057e52f))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* **regexp:** align String#=~ with MRI semantics ([c8f3e70](https://github.com/elct9620/kobako/commit/c8f3e70c9f0797c614aab1639934d280fe20b90a))
|
|
42
|
+
* **regexp:** bound backtracking, clamp match positions, harden engine errors ([0177f71](https://github.com/elct9620/kobako/commit/0177f71cccf61c140912aab3c2e639286fd768d0))
|
|
43
|
+
* **regexp:** correct String#split group and zero-width handling ([c0150bc](https://github.com/elct9620/kobako/commit/c0150bc04c5dccdd430b173219c42c8f607112d1))
|
|
44
|
+
* **regexp:** honour capturing groups and the limit arg in String#split ([66e7398](https://github.com/elct9620/kobako/commit/66e73984f8318b582cc7aa0db48deacfb10e8671))
|
|
45
|
+
* **regexp:** make Regexp.last_match= refresh the numbered globals ([e47b257](https://github.com/elct9620/kobako/commit/e47b257715b73263ae5d1f9bae67442197330ee0))
|
|
46
|
+
* **regexp:** name the pattern in match-time errors and snap String#index pos ([5835f42](https://github.com/elct9620/kobako/commit/5835f42ae6b27e2a2a0d0bc5bf8023024a20642a))
|
|
47
|
+
* **regexp:** stop escaping the slash in Regexp.escape ([6c6f17a](https://github.com/elct9620/kobako/commit/6c6f17a63dbddf30ccdba19ddf3c9b7fbb7772cd))
|
|
48
|
+
|
|
3
49
|
## [0.8.0](https://github.com/elct9620/kobako/compare/v0.7.0...v0.8.0) (2026-06-05)
|
|
4
50
|
|
|
5
51
|
|
data/README.md
CHANGED
|
@@ -322,6 +322,8 @@ Order-of-magnitude figures on macOS arm64, Ruby 3.4.7, YJIT off. Absolute values
|
|
|
322
322
|
|
|
323
323
|
Construct one Sandbox at boot so the ~600 ms JIT cost lands off the request hot path. `ext/` does not release the GVL during wasmtime execution, so wasm work is GVL-serialized: aggregate throughput stays around 7-8k `#eval`/s regardless of Thread count, though Ruby-side `#eval` setup still overlaps. A +10% regression on any of the six SPEC-mandated benchmarks blocks release.
|
|
324
324
|
|
|
325
|
+
Regexp is an opt-in capability gem, excluded from the default binary and the gated set; its throughput is tracked in a separate non-gated characterization (`#10` in [`benchmark/README.md`](benchmark/README.md)). There `=~` (~5 µs/match) costs about 4× `match?` (~1.2 µs), because `=~` eagerly builds the `MatchData` and match globals — prefer `match?` for boolean tests.
|
|
326
|
+
|
|
325
327
|
```bash
|
|
326
328
|
bundle exec rake bench # six gated regression benchmarks (~5-8 min)
|
|
327
329
|
```
|
|
@@ -335,7 +337,7 @@ bin/setup # install dependencies
|
|
|
335
337
|
bundle exec rake # default: compile + test + rubocop + steep
|
|
336
338
|
```
|
|
337
339
|
|
|
338
|
-
Building from source requires a WASI-capable Rust toolchain in addition to the standard host toolchain; the first compile walks the full
|
|
340
|
+
Building from source requires a WASI-capable Rust toolchain in addition to the standard host toolchain; the first compile walks the full chain — the [beni](https://github.com/elct9620/beni) gem vendors wasi-sdk + mruby and builds `libmruby.a` (`rake beni:build`), then `rake wasm:build` produces the Guest Binary. See [`CLAUDE.md`](CLAUDE.md) for the rake task map and pipeline layout. `bin/console` opens an IRB session with the gem preloaded; `bundle exec rake install` installs the local checkout as a gem.
|
|
339
341
|
|
|
340
342
|
## Contributing
|
|
341
343
|
|
data/data/kobako.wasm
CHANGED
|
Binary file
|
data/lib/kobako/3.3/kobako.so
CHANGED
|
Binary file
|
data/lib/kobako/3.4/kobako.so
CHANGED
|
Binary file
|
data/lib/kobako/4.0/kobako.so
CHANGED
|
Binary file
|
|
@@ -28,7 +28,7 @@ module Kobako
|
|
|
28
28
|
# installs ({docs/behavior.md B-12}[link:../../../docs/behavior.md]).
|
|
29
29
|
# The registry holds an injected +Catalog::Handles+ reference so
|
|
30
30
|
# dispatch target resolution and host→guest auto-wrap share the same
|
|
31
|
-
# Sandbox-owned allocator (docs/behavior.md B-19).
|
|
31
|
+
# Sandbox-owned allocator ({docs/behavior.md B-19}[link:../../../docs/behavior.md]).
|
|
32
32
|
class Namespaces
|
|
33
33
|
# Build a fresh registry. +handler+ is an internal seam that injects
|
|
34
34
|
# a pre-configured +Catalog::Handles+; tests pass one whose +next_id+
|
|
@@ -40,7 +40,8 @@ module Kobako
|
|
|
40
40
|
@sealed = false
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
# Declare or retrieve the Namespace named +name+ (idempotent —
|
|
43
|
+
# Declare or retrieve the Namespace named +name+ (idempotent —
|
|
44
|
+
# {docs/behavior.md B-10}[link:../../../docs/behavior.md]).
|
|
44
45
|
# +name+ is a constant-form name as a +Symbol+ or +String+ (must satisfy
|
|
45
46
|
# +Namespace::NAME_PATTERN+). Returns the +Kobako::Namespace+ for that
|
|
46
47
|
# name, creating it if it does not exist. Raises +ArgumentError+ when
|
data/lib/kobako/codec/factory.rb
CHANGED
|
@@ -77,9 +77,7 @@ module Kobako
|
|
|
77
77
|
)
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
# Symbol-to-name packer
|
|
81
|
-
# resolve the proc shape without tripping on +lambda(&:name)+'s
|
|
82
|
-
# +Symbol#to_proc+ inference path.
|
|
80
|
+
# Symbol-to-name packer for the ext-0x00 registration.
|
|
83
81
|
def pack_symbol(symbol)
|
|
84
82
|
symbol.name
|
|
85
83
|
end
|
|
@@ -148,8 +146,7 @@ module Kobako
|
|
|
148
146
|
# method when a nested ext 0x02 appears inside +details+. The recursion
|
|
149
147
|
# is bounded by msgpack nesting depth — identical to nested Array /
|
|
150
148
|
# Hash payloads — so no extra guard is needed. Do not switch back to
|
|
151
|
-
# +factory.load+ to "simplify": that path bypasses UTF-8 validation
|
|
152
|
-
# and re-opens the Decoder's special case for Fault (removed in M5).
|
|
149
|
+
# +factory.load+ to "simplify": that path bypasses UTF-8 validation.
|
|
153
150
|
def unpack_fault(payload)
|
|
154
151
|
Decoder.decode(payload) do |map|
|
|
155
152
|
raise InvalidType, "Fault payload must be a map" unless map.is_a?(Hash)
|
data/lib/kobako/codec/utils.rb
CHANGED
|
@@ -43,14 +43,12 @@ module Kobako
|
|
|
43
43
|
# stays {Kobako::Codec::Error} and never leaks +ArgumentError+ from
|
|
44
44
|
# the Ruby standard library.
|
|
45
45
|
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
# outside the codec boundary — host-layer +ArgumentError+ values
|
|
53
|
-
# should propagate unchanged.
|
|
46
|
+
# Reach for this only where a value object is constructed outside a
|
|
47
|
+
# {Decoder.decode} block, whose rescue already performs the same
|
|
48
|
+
# mapping (worked example: {Factory#unpack_handle} building
|
|
49
|
+
# +Handle.restore+ from a raw fixext payload). Do not use it for
|
|
50
|
+
# general-purpose validation outside the codec boundary —
|
|
51
|
+
# host-layer +ArgumentError+ values should propagate unchanged.
|
|
54
52
|
def with_boundary
|
|
55
53
|
yield
|
|
56
54
|
rescue ::ArgumentError => e
|
|
@@ -143,8 +141,7 @@ module Kobako
|
|
|
143
141
|
end
|
|
144
142
|
end
|
|
145
143
|
|
|
146
|
-
#
|
|
147
|
-
# budget — the closed-set non-container branch. Returns +true+ for
|
|
144
|
+
# The non-container branch of {representable?}: returns +true+ for
|
|
148
145
|
# the scalar leaves and an existing Handle. Not part of the
|
|
149
146
|
# public surface; reach for {representable?} instead.
|
|
150
147
|
def primitive_type?(value)
|
|
@@ -155,11 +152,10 @@ module Kobako
|
|
|
155
152
|
end
|
|
156
153
|
end
|
|
157
154
|
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
# instead.
|
|
155
|
+
# The container branch of {representable?}: recurses into Array
|
|
156
|
+
# elements and Hash key+value pairs through the public
|
|
157
|
+
# {representable?}. Not part of the public surface; reach for
|
|
158
|
+
# {representable?} instead.
|
|
163
159
|
def container_representable?(value)
|
|
164
160
|
case value
|
|
165
161
|
when ::Array then value.all? { |element| Utils.representable?(element) }
|
data/lib/kobako/errors.rb
CHANGED
|
@@ -26,9 +26,9 @@ module Kobako
|
|
|
26
26
|
# * {SetupError} — construction layer. Raised by `Kobako::Sandbox.new`
|
|
27
27
|
# when the wasm runtime cannot be built from the
|
|
28
28
|
# configured +wasm_path+ before any invocation runs
|
|
29
|
-
# (docs/behavior.md E-40 / E-41).
|
|
30
|
-
# outcome, so it never passes
|
|
31
|
-
# attribution decision.
|
|
29
|
+
# ({docs/behavior.md E-40 / E-41}[link:../../docs/behavior.md]).
|
|
30
|
+
# Not an invocation outcome, so it never passes
|
|
31
|
+
# through the two-step attribution decision.
|
|
32
32
|
#
|
|
33
33
|
# Subclasses pinned by docs/behavior.md Error Classes:
|
|
34
34
|
#
|
data/lib/kobako/fault.rb
CHANGED
|
@@ -22,10 +22,8 @@ module Kobako
|
|
|
22
22
|
# exception class (RuntimeError, ArgumentError, Kobako::ServiceError, ...)
|
|
23
23
|
# is the responsibility of the dispatch layer, not the codec.
|
|
24
24
|
#
|
|
25
|
-
# Built on the +class X < Data.define(...)+ subclass form
|
|
26
|
-
#
|
|
27
|
-
# this as the Steep-friendly shape and the +Style/DataInheritance+
|
|
28
|
-
# cop is disabled on that basis (see +.rubocop.yml+).
|
|
25
|
+
# Built on the +class X < Data.define(...)+ subclass form (the
|
|
26
|
+
# Steep-friendly shape — see +lib/kobako/outcome/panic.rb+).
|
|
29
27
|
class Fault < Data.define(:type, :message, :details)
|
|
30
28
|
VALID_TYPES = %w[runtime argument undefined].freeze
|
|
31
29
|
|
data/lib/kobako/sandbox.rb
CHANGED
|
@@ -292,9 +292,9 @@ module Kobako
|
|
|
292
292
|
#
|
|
293
293
|
# The yielded block must return a +Kobako::Snapshot+ — i.e. the
|
|
294
294
|
# value of +Runtime#eval+ / +#run+ (SPEC.md Internal Concepts →
|
|
295
|
-
# Snapshot). The success path unpacks
|
|
296
|
-
#
|
|
297
|
-
#
|
|
295
|
+
# Snapshot). The success path unpacks +#stdout+ / +#stderr+ into
|
|
296
|
+
# +Capture+ and feeds +#return_bytes+ to +Outcome.decode+; usage is
|
|
297
|
+
# populated by the +ensure+ readout ({#read_usage!}) on every outcome.
|
|
298
298
|
# The rescue chain is the single trap-translation boundary —
|
|
299
299
|
# configured-cap paths
|
|
300
300
|
# ({docs/behavior.md E-19 / E-20}[link:../../docs/behavior.md])
|
|
@@ -42,6 +42,17 @@ module Kobako
|
|
|
42
42
|
# ({docs/behavior.md E-12}[link:../../../docs/behavior.md]).
|
|
43
43
|
class UndefinedTargetError < StandardError; end
|
|
44
44
|
|
|
45
|
+
# Modules whose instance methods are ambient Ruby reflection /
|
|
46
|
+
# metaprogramming surface (+send+, +public_send+, +instance_eval+,
|
|
47
|
+
# +method+, +tap+, +instance_variable_get+, ...) rather than Service
|
|
48
|
+
# behaviour. A guest-supplied method name resolving to one of these is
|
|
49
|
+
# rejected: the security contract is that only methods the bound object
|
|
50
|
+
# itself defines are reachable, and +public_send(:send, ...)+ would
|
|
51
|
+
# otherwise let a guest pivot through +send+ into the private
|
|
52
|
+
# +Kernel#eval+ / +#system+ surface (host RCE).
|
|
53
|
+
META_OWNERS = [BasicObject, Kernel, Object, Module, Class].freeze
|
|
54
|
+
private_constant :META_OWNERS
|
|
55
|
+
|
|
45
56
|
# Dispatch a single transport request and return the encoded
|
|
46
57
|
# Response bytes ({docs/behavior.md B-12}[link:../../../docs/behavior.md]).
|
|
47
58
|
# Invoked from the +Runtime#on_dispatch+ Proc that
|
|
@@ -109,15 +120,34 @@ module Kobako
|
|
|
109
120
|
# so the same call site handles both cases without an explicit
|
|
110
121
|
# conditional.
|
|
111
122
|
def invoke(target, method, args, kwargs, yielder = nil)
|
|
123
|
+
name = method.to_sym
|
|
124
|
+
reject_meta_method!(target, name)
|
|
112
125
|
block = yielder&.to_proc
|
|
113
126
|
if kwargs.empty?
|
|
114
|
-
target.public_send(
|
|
127
|
+
target.public_send(name, *args, &block)
|
|
115
128
|
else
|
|
116
|
-
target.public_send(
|
|
129
|
+
target.public_send(name, *args, **kwargs, &block)
|
|
117
130
|
end
|
|
118
131
|
end
|
|
119
132
|
|
|
120
|
-
#
|
|
133
|
+
# Guard the +public_send+ below against ambient reflection methods
|
|
134
|
+
# (see {META_OWNERS}). A concretely-defined public method whose owner
|
|
135
|
+
# is a meta module is rejected; a name with no concrete public method
|
|
136
|
+
# is allowed only when the target opts into it via +respond_to?+
|
|
137
|
+
# (dynamic +method_missing+ Services), since the dangerous meta methods
|
|
138
|
+
# are all concretely defined and therefore never reach that branch.
|
|
139
|
+
def reject_meta_method!(target, name)
|
|
140
|
+
owner = target.public_method(name).owner
|
|
141
|
+
return unless META_OWNERS.include?(owner)
|
|
142
|
+
|
|
143
|
+
raise UndefinedTargetError, "method #{name.inspect} is not a Service method"
|
|
144
|
+
rescue NameError
|
|
145
|
+
return if target.respond_to?(name)
|
|
146
|
+
|
|
147
|
+
raise UndefinedTargetError, "no public method #{name.inspect} on target"
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# {docs/behavior.md B-16}[link:../../../docs/behavior.md] — A Kobako::Handle arriving as a positional or keyword
|
|
121
151
|
# argument identifies a host-side object previously allocated by a prior
|
|
122
152
|
# transport call's Handle wrap (B-14). Resolve it back to the Ruby object before
|
|
123
153
|
# the dispatch reaches +public_send+.
|
data/lib/kobako/usage.rb
CHANGED
|
@@ -28,10 +28,8 @@ module Kobako
|
|
|
28
28
|
# consumed. Before the first invocation +Sandbox#usage+ returns the
|
|
29
29
|
# pre-invocation sentinel +Kobako::Usage::EMPTY+.
|
|
30
30
|
#
|
|
31
|
-
# Built on the +class X < Data.define(...)+ subclass form
|
|
32
|
-
#
|
|
33
|
-
# as the Steep-friendly shape and the +Style/DataInheritance+ cop is
|
|
34
|
-
# disabled on that basis (see +.rubocop.yml+).
|
|
31
|
+
# Built on the +class X < Data.define(...)+ subclass form (the
|
|
32
|
+
# Steep-friendly shape — see +lib/kobako/outcome/panic.rb+).
|
|
35
33
|
class Usage < Data.define(:wall_time, :memory_peak)
|
|
36
34
|
# Pre-invocation sentinel ({docs/behavior.md B-35}[link:../../docs/behavior.md]).
|
|
37
35
|
# Reused by +Sandbox+ before any invocation has run so callers do not
|
data/lib/kobako/version.rb
CHANGED
data/release-please-config.json
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
".": {
|
|
7
7
|
"component": "kobako",
|
|
8
8
|
"include-component-in-tag": false,
|
|
9
|
-
"release-type": "ruby"
|
|
9
|
+
"release-type": "ruby",
|
|
10
|
+
"exclude-paths": ["wasm"],
|
|
11
|
+
"release-as": "0.9.1"
|
|
10
12
|
},
|
|
11
13
|
"wasm/kobako-core": {
|
|
12
14
|
"component": "kobako-core",
|
|
@@ -16,10 +18,71 @@
|
|
|
16
18
|
"type": "toml",
|
|
17
19
|
"path": "/wasm/Cargo.lock",
|
|
18
20
|
"jsonpath": "$.package[?(@.name=='kobako-core')].version"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "generic",
|
|
24
|
+
"path": "/wasm/kobako-core/README.md"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"wasm/kobako": {
|
|
29
|
+
"component": "kobako-rs",
|
|
30
|
+
"release-type": "rust",
|
|
31
|
+
"extra-files": [
|
|
32
|
+
{
|
|
33
|
+
"type": "toml",
|
|
34
|
+
"path": "/wasm/Cargo.lock",
|
|
35
|
+
"jsonpath": "$.package[?(@.name=='kobako')].version"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "toml",
|
|
39
|
+
"path": "/wasm/kobako/Cargo.toml",
|
|
40
|
+
"jsonpath": "$.dependencies['kobako-core'].version"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "generic",
|
|
44
|
+
"path": "/wasm/kobako/README.md"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"wasm/kobako-io": {
|
|
49
|
+
"component": "kobako-io",
|
|
50
|
+
"release-type": "rust",
|
|
51
|
+
"extra-files": [
|
|
52
|
+
{
|
|
53
|
+
"type": "toml",
|
|
54
|
+
"path": "/wasm/Cargo.lock",
|
|
55
|
+
"jsonpath": "$.package[?(@.name=='kobako-io')].version"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "generic",
|
|
59
|
+
"path": "/wasm/kobako-io/README.md"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"wasm/kobako-regexp": {
|
|
64
|
+
"component": "kobako-regexp",
|
|
65
|
+
"release-type": "rust",
|
|
66
|
+
"extra-files": [
|
|
67
|
+
{
|
|
68
|
+
"type": "toml",
|
|
69
|
+
"path": "/wasm/Cargo.lock",
|
|
70
|
+
"jsonpath": "$.package[?(@.name=='kobako-regexp')].version"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "generic",
|
|
74
|
+
"path": "/wasm/kobako-regexp/README.md"
|
|
19
75
|
}
|
|
20
76
|
]
|
|
21
77
|
}
|
|
22
78
|
},
|
|
79
|
+
"plugins": [
|
|
80
|
+
{
|
|
81
|
+
"type": "linked-versions",
|
|
82
|
+
"groupName": "kobako guest crates",
|
|
83
|
+
"components": ["kobako-core", "kobako-rs", "kobako-io", "kobako-regexp"]
|
|
84
|
+
}
|
|
85
|
+
],
|
|
23
86
|
"extra-files": [
|
|
24
87
|
{
|
|
25
88
|
"type": "toml",
|
data/rust-toolchain.toml
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Pin the Rust toolchain so local builds and CI stay byte-identical.
|
|
2
2
|
# The wasm32-wasip1 crt1-command.o references __wasi_init_tp from 1.96 onward;
|
|
3
3
|
# vendored wasi-sdk 33's libc.a supplies that symbol, so the two move together.
|
|
4
|
-
# Bump this in lockstep with
|
|
4
|
+
# Bump this in lockstep with the wasi-sdk toolchain beni vendors
|
|
5
|
+
# (`rake beni:build`, wired in the Rakefile's Beni::Tasks block).
|
|
5
6
|
# This file is the single source of the channel; the CI workflows read it.
|
|
6
7
|
[toolchain]
|
|
7
8
|
channel = "stable"
|
|
@@ -6,6 +6,8 @@ module Kobako
|
|
|
6
6
|
|
|
7
7
|
BREAK_THROW: Symbol
|
|
8
8
|
|
|
9
|
+
META_OWNERS: Array[Module]
|
|
10
|
+
|
|
9
11
|
def self?.dispatch: (String request_bytes, Kobako::Catalog::Namespaces namespaces, Kobako::Catalog::Handles handler, ^(String) -> String yield_to_guest) -> String
|
|
10
12
|
|
|
11
13
|
def self?.resolve_call_args: (Kobako::Transport::Request request, Kobako::Catalog::Handles handler) -> [Array[untyped], Hash[Symbol, untyped]]
|
|
@@ -14,6 +16,8 @@ module Kobako
|
|
|
14
16
|
|
|
15
17
|
def self?.invoke: (untyped target, String method, Array[untyped] args, Hash[Symbol, untyped] kwargs, ?Kobako::Transport::Yielder? yielder) -> untyped
|
|
16
18
|
|
|
19
|
+
def self?.reject_meta_method!: (untyped target, Symbol name) -> void
|
|
20
|
+
|
|
17
21
|
def self?.resolve_arg: (untyped value, Kobako::Catalog::Handles handler) -> untyped
|
|
18
22
|
|
|
19
23
|
def self?.resolve_target: (String | Kobako::Handle target, Kobako::Catalog::Namespaces namespaces, Kobako::Catalog::Handles handler) -> untyped
|
data/sig/kobako.rbs
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kobako
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.1
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Aotokitsuruya
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: msgpack
|
|
@@ -84,6 +84,7 @@ files:
|
|
|
84
84
|
- sig/kobako/catalog/handles.rbs
|
|
85
85
|
- sig/kobako/catalog/namespaces.rbs
|
|
86
86
|
- sig/kobako/catalog/snippets.rbs
|
|
87
|
+
- sig/kobako/codec.rbs
|
|
87
88
|
- sig/kobako/codec/decoder.rbs
|
|
88
89
|
- sig/kobako/codec/encoder.rbs
|
|
89
90
|
- sig/kobako/codec/error.rbs
|
|
@@ -111,6 +112,7 @@ files:
|
|
|
111
112
|
- sig/kobako/transport/yield.rbs
|
|
112
113
|
- sig/kobako/transport/yielder.rbs
|
|
113
114
|
- sig/kobako/usage.rbs
|
|
115
|
+
- sig/kobako/version.rbs
|
|
114
116
|
homepage: https://github.com/elct9620/kobako
|
|
115
117
|
licenses:
|
|
116
118
|
- Apache-2.0
|