kobako 0.11.1 → 0.11.2
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 +11 -0
- data/Cargo.lock +129 -74
- data/data/kobako.wasm +0 -0
- data/ext/kobako/Cargo.toml +2 -2
- data/ext/kobako/src/runtime/cache.rs +1 -1
- data/ext/kobako/src/runtime/errors.rs +90 -0
- data/ext/kobako/src/runtime/frames.rs +188 -0
- data/ext/kobako/src/runtime/instance_pre.rs +2 -1
- data/ext/kobako/src/runtime/trap.rs +1 -1
- data/ext/kobako/src/runtime.rs +17 -276
- data/lib/kobako/catalog/handles.rb +4 -4
- data/lib/kobako/codec/handle_walk.rb +131 -0
- data/lib/kobako/codec/utils.rb +4 -117
- data/lib/kobako/codec.rb +1 -0
- data/lib/kobako/handle.rb +1 -1
- data/lib/kobako/outcome.rb +2 -10
- data/lib/kobako/sandbox.rb +1 -1
- data/lib/kobako/transport/dispatcher.rb +3 -7
- data/lib/kobako/transport/run.rb +4 -4
- data/lib/kobako/transport/yielder.rb +1 -1
- data/lib/kobako/version.rb +1 -1
- data/release-please-config.json +0 -1
- data/sig/kobako/codec/handle_walk.rbs +17 -0
- data/sig/kobako/codec/utils.rbs +0 -12
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c90eca0dd289dd124e64df3d7a921818ebb7dfb06aa804892facfc8634e96dd1
|
|
4
|
+
data.tar.gz: e9584fcf706d2c3c1e40d4784d03216e1f7611036b0e441d8021b333f4a570d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a7cf3f95d00f96cacb30383e5da5c80359433ec53656812a5d4cdfadb0c54dd134faa52923ef4d642e3e01ba23b4aff710b814161b8b578d24f36610a83d8cc
|
|
7
|
+
data.tar.gz: d0db540a502060cd60ad9e697ce1c4fee60c567a53d24a4bcbaa4ce1d77e23cb0e0cc5a39ca2414537fa7b1ce878c7a9962987a7df8cd0c64f78617dd3eb4edd
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{".":"0.11.
|
|
1
|
+
{".":"0.11.2","wasm/kobako-core":"0.5.2","wasm/kobako":"0.5.2","wasm/kobako-io":"0.5.2","wasm/kobako-regexp":"0.5.2","wasm/kobako-baker":"0.5.2"}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.2](https://github.com/elct9620/kobako/compare/v0.11.1...v0.11.2) (2026-06-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **codec:** encode guest Handle args/kwargs as ext 0x01 ([bd58538](https://github.com/elct9620/kobako/commit/bd58538f4dbbf91a0927d15fd37f47abc761f8a6))
|
|
9
|
+
* **codec:** refuse out-of-range inbound integers instead of saturating ([f9e9184](https://github.com/elct9620/kobako/commit/f9e91845e0f28fecbb0867d8b70c871cd1feafea))
|
|
10
|
+
* **dispatch:** keep short method names intact across kwarg unpacking ([c6e4a6f](https://github.com/elct9620/kobako/commit/c6e4a6f268970c0c2d2851d3a23e3bec153dc56d))
|
|
11
|
+
* **release:** drop the group PR title pattern that breaks tagging ([d797350](https://github.com/elct9620/kobako/commit/d797350953c2de82df592d3c88e44155d3f076dc))
|
|
12
|
+
* **release:** scope publish triggers to each release's owning tag ([58508a1](https://github.com/elct9620/kobako/commit/58508a1e967799522b2674a989233d8619cabbc9))
|
|
13
|
+
|
|
3
14
|
## [0.11.1](https://github.com/elct9620/kobako/compare/v0.11.0...v0.11.1) (2026-06-14)
|
|
4
15
|
|
|
5
16
|
|
data/Cargo.lock
CHANGED
|
@@ -97,6 +97,15 @@ dependencies = [
|
|
|
97
97
|
"generic-array",
|
|
98
98
|
]
|
|
99
99
|
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "block-buffer"
|
|
102
|
+
version = "0.12.1"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
|
|
105
|
+
dependencies = [
|
|
106
|
+
"hybrid-array",
|
|
107
|
+
]
|
|
108
|
+
|
|
100
109
|
[[package]]
|
|
101
110
|
name = "bumpalo"
|
|
102
111
|
version = "3.20.2"
|
|
@@ -236,6 +245,12 @@ dependencies = [
|
|
|
236
245
|
"thiserror 2.0.18",
|
|
237
246
|
]
|
|
238
247
|
|
|
248
|
+
[[package]]
|
|
249
|
+
name = "const-oid"
|
|
250
|
+
version = "0.10.2"
|
|
251
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
252
|
+
checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
|
|
253
|
+
|
|
239
254
|
[[package]]
|
|
240
255
|
name = "core-foundation-sys"
|
|
241
256
|
version = "0.8.7"
|
|
@@ -271,27 +286,27 @@ dependencies = [
|
|
|
271
286
|
|
|
272
287
|
[[package]]
|
|
273
288
|
name = "cranelift-assembler-x64"
|
|
274
|
-
version = "0.132.
|
|
289
|
+
version = "0.132.2"
|
|
275
290
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
276
|
-
checksum = "
|
|
291
|
+
checksum = "0bc293b86236abcc45f2f72e2d18e2bd636f2a08b75eb286bae31e71e1430c91"
|
|
277
292
|
dependencies = [
|
|
278
293
|
"cranelift-assembler-x64-meta",
|
|
279
294
|
]
|
|
280
295
|
|
|
281
296
|
[[package]]
|
|
282
297
|
name = "cranelift-assembler-x64-meta"
|
|
283
|
-
version = "0.132.
|
|
298
|
+
version = "0.132.2"
|
|
284
299
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
285
|
-
checksum = "
|
|
300
|
+
checksum = "b954c826eddaf1b001402cb8aecf1764c6f6d637ba69fb9e3311f1ebac965be6"
|
|
286
301
|
dependencies = [
|
|
287
302
|
"cranelift-srcgen",
|
|
288
303
|
]
|
|
289
304
|
|
|
290
305
|
[[package]]
|
|
291
306
|
name = "cranelift-bforest"
|
|
292
|
-
version = "0.132.
|
|
307
|
+
version = "0.132.1"
|
|
293
308
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
294
|
-
checksum = "
|
|
309
|
+
checksum = "5694aa8a2eb2571a15b3feee38d16ccaf2712200e7b5c9ae0479069bdfb46949"
|
|
295
310
|
dependencies = [
|
|
296
311
|
"cranelift-entity",
|
|
297
312
|
"wasmtime-internal-core",
|
|
@@ -299,9 +314,9 @@ dependencies = [
|
|
|
299
314
|
|
|
300
315
|
[[package]]
|
|
301
316
|
name = "cranelift-bitset"
|
|
302
|
-
version = "0.132.
|
|
317
|
+
version = "0.132.1"
|
|
303
318
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
-
checksum = "
|
|
319
|
+
checksum = "93ab349d30a5fad9699440ee7ccb435374e8a8735dcca26696a4245bcefcc47e"
|
|
305
320
|
dependencies = [
|
|
306
321
|
"serde",
|
|
307
322
|
"serde_derive",
|
|
@@ -310,9 +325,9 @@ dependencies = [
|
|
|
310
325
|
|
|
311
326
|
[[package]]
|
|
312
327
|
name = "cranelift-codegen"
|
|
313
|
-
version = "0.132.
|
|
328
|
+
version = "0.132.1"
|
|
314
329
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
315
|
-
checksum = "
|
|
330
|
+
checksum = "3e95970bdb51d145c828a114a1084cb8b63e65569a51600ad398cb49fa78b062"
|
|
316
331
|
dependencies = [
|
|
317
332
|
"bumpalo",
|
|
318
333
|
"cranelift-assembler-x64",
|
|
@@ -338,9 +353,9 @@ dependencies = [
|
|
|
338
353
|
|
|
339
354
|
[[package]]
|
|
340
355
|
name = "cranelift-codegen-meta"
|
|
341
|
-
version = "0.132.
|
|
356
|
+
version = "0.132.1"
|
|
342
357
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
343
|
-
checksum = "
|
|
358
|
+
checksum = "0e8414b8ecc81f89f8a3f2c5cbc785b9ed690200cd6f9d780e96a92f88879704"
|
|
344
359
|
dependencies = [
|
|
345
360
|
"cranelift-assembler-x64-meta",
|
|
346
361
|
"cranelift-codegen-shared",
|
|
@@ -351,24 +366,24 @@ dependencies = [
|
|
|
351
366
|
|
|
352
367
|
[[package]]
|
|
353
368
|
name = "cranelift-codegen-shared"
|
|
354
|
-
version = "0.132.
|
|
369
|
+
version = "0.132.2"
|
|
355
370
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
356
|
-
checksum = "
|
|
371
|
+
checksum = "78fdb83ab012d0ee6a44ced7ca8788a444f17cf821c62f95d6ef87c9f0262518"
|
|
357
372
|
|
|
358
373
|
[[package]]
|
|
359
374
|
name = "cranelift-control"
|
|
360
|
-
version = "0.132.
|
|
375
|
+
version = "0.132.2"
|
|
361
376
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
362
|
-
checksum = "
|
|
377
|
+
checksum = "1b75adc6eb7bb4ac6365106afb6cac4f12fe1ddfa02ddc9fd7015ca1469b471b"
|
|
363
378
|
dependencies = [
|
|
364
379
|
"arbitrary",
|
|
365
380
|
]
|
|
366
381
|
|
|
367
382
|
[[package]]
|
|
368
383
|
name = "cranelift-entity"
|
|
369
|
-
version = "0.132.
|
|
384
|
+
version = "0.132.1"
|
|
370
385
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
371
|
-
checksum = "
|
|
386
|
+
checksum = "55e57cd185782abada9ab2606bfe88d0abc0d42d83a7d432dcf69991e17fe76e"
|
|
372
387
|
dependencies = [
|
|
373
388
|
"cranelift-bitset",
|
|
374
389
|
"serde",
|
|
@@ -378,9 +393,9 @@ dependencies = [
|
|
|
378
393
|
|
|
379
394
|
[[package]]
|
|
380
395
|
name = "cranelift-frontend"
|
|
381
|
-
version = "0.132.
|
|
396
|
+
version = "0.132.1"
|
|
382
397
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
383
|
-
checksum = "
|
|
398
|
+
checksum = "8a0f17e48d15e29552e2f264d302c31a661a830196d879bbdaf4d7b2bf2f7011"
|
|
384
399
|
dependencies = [
|
|
385
400
|
"cranelift-codegen",
|
|
386
401
|
"log",
|
|
@@ -390,15 +405,15 @@ dependencies = [
|
|
|
390
405
|
|
|
391
406
|
[[package]]
|
|
392
407
|
name = "cranelift-isle"
|
|
393
|
-
version = "0.132.
|
|
408
|
+
version = "0.132.1"
|
|
394
409
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
395
|
-
checksum = "
|
|
410
|
+
checksum = "407b80b46934c9dce9a6581f0e80d079b7a69e11372fb03d7dce4c7ba3fee4e3"
|
|
396
411
|
|
|
397
412
|
[[package]]
|
|
398
413
|
name = "cranelift-native"
|
|
399
|
-
version = "0.132.
|
|
414
|
+
version = "0.132.1"
|
|
400
415
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
401
|
-
checksum = "
|
|
416
|
+
checksum = "3a40e056e421d9a6c757983f2184f765ae1c28a51555d3877e98afc97ce5705b"
|
|
402
417
|
dependencies = [
|
|
403
418
|
"cranelift-codegen",
|
|
404
419
|
"libc",
|
|
@@ -407,9 +422,9 @@ dependencies = [
|
|
|
407
422
|
|
|
408
423
|
[[package]]
|
|
409
424
|
name = "cranelift-srcgen"
|
|
410
|
-
version = "0.132.
|
|
425
|
+
version = "0.132.2"
|
|
411
426
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
412
|
-
checksum = "
|
|
427
|
+
checksum = "cba7c0ff5941842c36653da155580ce41e675c204a67ac1b4e1c478a9347bbb7"
|
|
413
428
|
|
|
414
429
|
[[package]]
|
|
415
430
|
name = "crc32fast"
|
|
@@ -430,14 +445,34 @@ dependencies = [
|
|
|
430
445
|
"typenum",
|
|
431
446
|
]
|
|
432
447
|
|
|
448
|
+
[[package]]
|
|
449
|
+
name = "crypto-common"
|
|
450
|
+
version = "0.2.2"
|
|
451
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
452
|
+
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
|
|
453
|
+
dependencies = [
|
|
454
|
+
"hybrid-array",
|
|
455
|
+
]
|
|
456
|
+
|
|
433
457
|
[[package]]
|
|
434
458
|
name = "digest"
|
|
435
459
|
version = "0.10.7"
|
|
436
460
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
437
461
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
|
438
462
|
dependencies = [
|
|
439
|
-
"block-buffer",
|
|
440
|
-
"crypto-common",
|
|
463
|
+
"block-buffer 0.10.4",
|
|
464
|
+
"crypto-common 0.1.7",
|
|
465
|
+
]
|
|
466
|
+
|
|
467
|
+
[[package]]
|
|
468
|
+
name = "digest"
|
|
469
|
+
version = "0.11.3"
|
|
470
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
471
|
+
checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
|
|
472
|
+
dependencies = [
|
|
473
|
+
"block-buffer 0.12.1",
|
|
474
|
+
"const-oid",
|
|
475
|
+
"crypto-common 0.2.2",
|
|
441
476
|
]
|
|
442
477
|
|
|
443
478
|
[[package]]
|
|
@@ -673,6 +708,15 @@ version = "0.5.0"
|
|
|
673
708
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
674
709
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
675
710
|
|
|
711
|
+
[[package]]
|
|
712
|
+
name = "hybrid-array"
|
|
713
|
+
version = "0.4.12"
|
|
714
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
715
|
+
checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da"
|
|
716
|
+
dependencies = [
|
|
717
|
+
"typenum",
|
|
718
|
+
]
|
|
719
|
+
|
|
676
720
|
[[package]]
|
|
677
721
|
name = "iana-time-zone"
|
|
678
722
|
version = "0.1.65"
|
|
@@ -878,11 +922,11 @@ dependencies = [
|
|
|
878
922
|
|
|
879
923
|
[[package]]
|
|
880
924
|
name = "kobako"
|
|
881
|
-
version = "0.11.
|
|
925
|
+
version = "0.11.2"
|
|
882
926
|
dependencies = [
|
|
883
927
|
"libc",
|
|
884
928
|
"magnus",
|
|
885
|
-
"sha2",
|
|
929
|
+
"sha2 0.11.0",
|
|
886
930
|
"wasmtime",
|
|
887
931
|
"wasmtime-wasi",
|
|
888
932
|
]
|
|
@@ -1097,9 +1141,9 @@ dependencies = [
|
|
|
1097
1141
|
|
|
1098
1142
|
[[package]]
|
|
1099
1143
|
name = "pulley-interpreter"
|
|
1100
|
-
version = "45.0.
|
|
1144
|
+
version = "45.0.1"
|
|
1101
1145
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1102
|
-
checksum = "
|
|
1146
|
+
checksum = "dd6ccdd6fc70f6c33eb21cb8fe05a71a5f7ee4cbef7a093a8a87dd8a908697cd"
|
|
1103
1147
|
dependencies = [
|
|
1104
1148
|
"cranelift-bitset",
|
|
1105
1149
|
"log",
|
|
@@ -1109,9 +1153,9 @@ dependencies = [
|
|
|
1109
1153
|
|
|
1110
1154
|
[[package]]
|
|
1111
1155
|
name = "pulley-macros"
|
|
1112
|
-
version = "45.0.
|
|
1156
|
+
version = "45.0.1"
|
|
1113
1157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1114
|
-
checksum = "
|
|
1158
|
+
checksum = "e00101fdb6fcaf9ea98a1994be11861d7e0c910c718c41bae373c44179e3160c"
|
|
1115
1159
|
dependencies = [
|
|
1116
1160
|
"proc-macro2",
|
|
1117
1161
|
"quote",
|
|
@@ -1331,7 +1375,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
|
|
1331
1375
|
dependencies = [
|
|
1332
1376
|
"cfg-if",
|
|
1333
1377
|
"cpufeatures 0.2.17",
|
|
1334
|
-
"digest",
|
|
1378
|
+
"digest 0.10.7",
|
|
1379
|
+
]
|
|
1380
|
+
|
|
1381
|
+
[[package]]
|
|
1382
|
+
name = "sha2"
|
|
1383
|
+
version = "0.11.0"
|
|
1384
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1385
|
+
checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
|
|
1386
|
+
dependencies = [
|
|
1387
|
+
"cfg-if",
|
|
1388
|
+
"cpufeatures 0.3.0",
|
|
1389
|
+
"digest 0.11.3",
|
|
1335
1390
|
]
|
|
1336
1391
|
|
|
1337
1392
|
[[package]]
|
|
@@ -1696,9 +1751,9 @@ dependencies = [
|
|
|
1696
1751
|
|
|
1697
1752
|
[[package]]
|
|
1698
1753
|
name = "wasmtime"
|
|
1699
|
-
version = "45.0.
|
|
1754
|
+
version = "45.0.1"
|
|
1700
1755
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1701
|
-
checksum = "
|
|
1756
|
+
checksum = "c191891081c3bf9f10cb579819b32b0e81695641dc639eef34b57cf10c59ad81"
|
|
1702
1757
|
dependencies = [
|
|
1703
1758
|
"addr2line",
|
|
1704
1759
|
"async-trait",
|
|
@@ -1740,9 +1795,9 @@ dependencies = [
|
|
|
1740
1795
|
|
|
1741
1796
|
[[package]]
|
|
1742
1797
|
name = "wasmtime-environ"
|
|
1743
|
-
version = "45.0.
|
|
1798
|
+
version = "45.0.1"
|
|
1744
1799
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1745
|
-
checksum = "
|
|
1800
|
+
checksum = "0f337d68a62d868f3c297517b46d20dc7e293f0da36bbee2f6ec3c30eab938bd"
|
|
1746
1801
|
dependencies = [
|
|
1747
1802
|
"anyhow",
|
|
1748
1803
|
"cpp_demangle",
|
|
@@ -1759,7 +1814,7 @@ dependencies = [
|
|
|
1759
1814
|
"semver",
|
|
1760
1815
|
"serde",
|
|
1761
1816
|
"serde_derive",
|
|
1762
|
-
"sha2",
|
|
1817
|
+
"sha2 0.10.9",
|
|
1763
1818
|
"smallvec",
|
|
1764
1819
|
"target-lexicon",
|
|
1765
1820
|
"wasm-encoder 0.248.0",
|
|
@@ -1771,9 +1826,9 @@ dependencies = [
|
|
|
1771
1826
|
|
|
1772
1827
|
[[package]]
|
|
1773
1828
|
name = "wasmtime-internal-component-macro"
|
|
1774
|
-
version = "45.0.
|
|
1829
|
+
version = "45.0.1"
|
|
1775
1830
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1776
|
-
checksum = "
|
|
1831
|
+
checksum = "ab1cc8df1940657960571d7bc9bc0eadf869c0eb95cff831a6554409f89b25b0"
|
|
1777
1832
|
dependencies = [
|
|
1778
1833
|
"anyhow",
|
|
1779
1834
|
"proc-macro2",
|
|
@@ -1786,15 +1841,15 @@ dependencies = [
|
|
|
1786
1841
|
|
|
1787
1842
|
[[package]]
|
|
1788
1843
|
name = "wasmtime-internal-component-util"
|
|
1789
|
-
version = "45.0.
|
|
1844
|
+
version = "45.0.1"
|
|
1790
1845
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1791
|
-
checksum = "
|
|
1846
|
+
checksum = "f73ccd2e0e6bd91fb0161a17ee5e2d7badbeba6eb7461d0e0e3991492bd3835d"
|
|
1792
1847
|
|
|
1793
1848
|
[[package]]
|
|
1794
1849
|
name = "wasmtime-internal-core"
|
|
1795
|
-
version = "45.0.
|
|
1850
|
+
version = "45.0.1"
|
|
1796
1851
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1797
|
-
checksum = "
|
|
1852
|
+
checksum = "110bf85122cd451d3b9ff67f8911d428ec9b729208abe950a0333c3244660e88"
|
|
1798
1853
|
dependencies = [
|
|
1799
1854
|
"hashbrown 0.17.0",
|
|
1800
1855
|
"libm",
|
|
@@ -1803,9 +1858,9 @@ dependencies = [
|
|
|
1803
1858
|
|
|
1804
1859
|
[[package]]
|
|
1805
1860
|
name = "wasmtime-internal-cranelift"
|
|
1806
|
-
version = "45.0.
|
|
1861
|
+
version = "45.0.1"
|
|
1807
1862
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1808
|
-
checksum = "
|
|
1863
|
+
checksum = "b0236a21553c5b30ee953f413a8dc99729548b747219eef7e70f8288ed313ebe"
|
|
1809
1864
|
dependencies = [
|
|
1810
1865
|
"cfg-if",
|
|
1811
1866
|
"cranelift-codegen",
|
|
@@ -1830,9 +1885,9 @@ dependencies = [
|
|
|
1830
1885
|
|
|
1831
1886
|
[[package]]
|
|
1832
1887
|
name = "wasmtime-internal-fiber"
|
|
1833
|
-
version = "45.0.
|
|
1888
|
+
version = "45.0.1"
|
|
1834
1889
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1835
|
-
checksum = "
|
|
1890
|
+
checksum = "1ccd50931b61ad593ae91e62d41a96b997b26c9308305cae4523cfef9301d9e8"
|
|
1836
1891
|
dependencies = [
|
|
1837
1892
|
"cc",
|
|
1838
1893
|
"cfg-if",
|
|
@@ -1845,9 +1900,9 @@ dependencies = [
|
|
|
1845
1900
|
|
|
1846
1901
|
[[package]]
|
|
1847
1902
|
name = "wasmtime-internal-jit-debug"
|
|
1848
|
-
version = "45.0.
|
|
1903
|
+
version = "45.0.1"
|
|
1849
1904
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1850
|
-
checksum = "
|
|
1905
|
+
checksum = "b0a52ca7429272234b44f81fdf80d4793593e5c368b0f960d41fd401b1117bec"
|
|
1851
1906
|
dependencies = [
|
|
1852
1907
|
"cc",
|
|
1853
1908
|
"wasmtime-internal-versioned-export-macros",
|
|
@@ -1855,9 +1910,9 @@ dependencies = [
|
|
|
1855
1910
|
|
|
1856
1911
|
[[package]]
|
|
1857
1912
|
name = "wasmtime-internal-jit-icache-coherence"
|
|
1858
|
-
version = "45.0.
|
|
1913
|
+
version = "45.0.1"
|
|
1859
1914
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1860
|
-
checksum = "
|
|
1915
|
+
checksum = "aa6818a4864719772680694f4e4649a8600bb5efcf71111ebaf7419b266463e8"
|
|
1861
1916
|
dependencies = [
|
|
1862
1917
|
"cfg-if",
|
|
1863
1918
|
"libc",
|
|
@@ -1867,9 +1922,9 @@ dependencies = [
|
|
|
1867
1922
|
|
|
1868
1923
|
[[package]]
|
|
1869
1924
|
name = "wasmtime-internal-unwinder"
|
|
1870
|
-
version = "45.0.
|
|
1925
|
+
version = "45.0.1"
|
|
1871
1926
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1872
|
-
checksum = "
|
|
1927
|
+
checksum = "1fdc6a69c42fbbf13104ccbf0d3c096d0392f00102e2c70b542d9fca402eb162"
|
|
1873
1928
|
dependencies = [
|
|
1874
1929
|
"cfg-if",
|
|
1875
1930
|
"cranelift-codegen",
|
|
@@ -1880,9 +1935,9 @@ dependencies = [
|
|
|
1880
1935
|
|
|
1881
1936
|
[[package]]
|
|
1882
1937
|
name = "wasmtime-internal-versioned-export-macros"
|
|
1883
|
-
version = "45.0.
|
|
1938
|
+
version = "45.0.1"
|
|
1884
1939
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1885
|
-
checksum = "
|
|
1940
|
+
checksum = "fa0bd1cd696ec4b7e6f46357c0479e7739c3858e54afb69a15765402bbc1f9dd"
|
|
1886
1941
|
dependencies = [
|
|
1887
1942
|
"proc-macro2",
|
|
1888
1943
|
"quote",
|
|
@@ -1891,9 +1946,9 @@ dependencies = [
|
|
|
1891
1946
|
|
|
1892
1947
|
[[package]]
|
|
1893
1948
|
name = "wasmtime-internal-winch"
|
|
1894
|
-
version = "45.0.
|
|
1949
|
+
version = "45.0.1"
|
|
1895
1950
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1896
|
-
checksum = "
|
|
1951
|
+
checksum = "5c2ca01234ef55acd10c0fa5a2f96c3fd422eba03b221e2e9572944d19a476a7"
|
|
1897
1952
|
dependencies = [
|
|
1898
1953
|
"cranelift-codegen",
|
|
1899
1954
|
"gimli",
|
|
@@ -1908,9 +1963,9 @@ dependencies = [
|
|
|
1908
1963
|
|
|
1909
1964
|
[[package]]
|
|
1910
1965
|
name = "wasmtime-internal-wit-bindgen"
|
|
1911
|
-
version = "45.0.
|
|
1966
|
+
version = "45.0.1"
|
|
1912
1967
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1913
|
-
checksum = "
|
|
1968
|
+
checksum = "708b3d8cfaad2d33a92ec4ed93d69e9836c04f7eb5b8dfe1dde9df47c41f20b7"
|
|
1914
1969
|
dependencies = [
|
|
1915
1970
|
"anyhow",
|
|
1916
1971
|
"bitflags",
|
|
@@ -1921,9 +1976,9 @@ dependencies = [
|
|
|
1921
1976
|
|
|
1922
1977
|
[[package]]
|
|
1923
1978
|
name = "wasmtime-wasi"
|
|
1924
|
-
version = "45.0.
|
|
1979
|
+
version = "45.0.1"
|
|
1925
1980
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1926
|
-
checksum = "
|
|
1981
|
+
checksum = "79d0c0121dcc5152390d099fb853b9a0d79e7e0a172c12cc668ea8c5d8f883c2"
|
|
1927
1982
|
dependencies = [
|
|
1928
1983
|
"async-trait",
|
|
1929
1984
|
"bitflags",
|
|
@@ -1951,9 +2006,9 @@ dependencies = [
|
|
|
1951
2006
|
|
|
1952
2007
|
[[package]]
|
|
1953
2008
|
name = "wasmtime-wasi-io"
|
|
1954
|
-
version = "45.0.
|
|
2009
|
+
version = "45.0.1"
|
|
1955
2010
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1956
|
-
checksum = "
|
|
2011
|
+
checksum = "02ca2fd53dbd62f5f95b470b43ff1e711933e8f30ebc89d9050351a72f6e5c28"
|
|
1957
2012
|
dependencies = [
|
|
1958
2013
|
"async-trait",
|
|
1959
2014
|
"bytes",
|
|
@@ -1995,9 +2050,9 @@ dependencies = [
|
|
|
1995
2050
|
|
|
1996
2051
|
[[package]]
|
|
1997
2052
|
name = "wiggle"
|
|
1998
|
-
version = "45.0.
|
|
2053
|
+
version = "45.0.1"
|
|
1999
2054
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2000
|
-
checksum = "
|
|
2055
|
+
checksum = "a4cd8015611a3bc95e449ad198dfd133b7488759b0dc49b515052101eb954587"
|
|
2001
2056
|
dependencies = [
|
|
2002
2057
|
"bitflags",
|
|
2003
2058
|
"thiserror 2.0.18",
|
|
@@ -2009,9 +2064,9 @@ dependencies = [
|
|
|
2009
2064
|
|
|
2010
2065
|
[[package]]
|
|
2011
2066
|
name = "wiggle-generate"
|
|
2012
|
-
version = "45.0.
|
|
2067
|
+
version = "45.0.1"
|
|
2013
2068
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2014
|
-
checksum = "
|
|
2069
|
+
checksum = "5c0f655ec3eba7df68408018796911a6acdda3a41e67d6551a3766563495e333"
|
|
2015
2070
|
dependencies = [
|
|
2016
2071
|
"heck",
|
|
2017
2072
|
"proc-macro2",
|
|
@@ -2023,9 +2078,9 @@ dependencies = [
|
|
|
2023
2078
|
|
|
2024
2079
|
[[package]]
|
|
2025
2080
|
name = "wiggle-macro"
|
|
2026
|
-
version = "45.0.
|
|
2081
|
+
version = "45.0.1"
|
|
2027
2082
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2028
|
-
checksum = "
|
|
2083
|
+
checksum = "7a22f38e7b0f2a3b58bae4dd655dcedd65d56f257916a5eda5f08c40910ee9d4"
|
|
2029
2084
|
dependencies = [
|
|
2030
2085
|
"proc-macro2",
|
|
2031
2086
|
"quote",
|
|
@@ -2044,9 +2099,9 @@ dependencies = [
|
|
|
2044
2099
|
|
|
2045
2100
|
[[package]]
|
|
2046
2101
|
name = "winch-codegen"
|
|
2047
|
-
version = "45.0.
|
|
2102
|
+
version = "45.0.1"
|
|
2048
2103
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2049
|
-
checksum = "
|
|
2104
|
+
checksum = "35fdfab04a4d446c558a9ea994ded662d35580a17b15385b862002703aa43245"
|
|
2050
2105
|
dependencies = [
|
|
2051
2106
|
"cranelift-assembler-x64",
|
|
2052
2107
|
"cranelift-codegen",
|
data/data/kobako.wasm
CHANGED
|
Binary file
|
data/ext/kobako/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "kobako"
|
|
3
|
-
version = "0.11.
|
|
3
|
+
version = "0.11.2"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["Aotokitsuruya <contact@aotoki.me>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -35,7 +35,7 @@ wasmtime-wasi = { version = "45.0.0", default-features = false, features = ["p1"
|
|
|
35
35
|
# sha2 keys the on-disk compiled-module cache by Guest Binary content
|
|
36
36
|
# (see runtime/cache.rs); a collision would load the wrong artifact, so
|
|
37
37
|
# the hash must be cryptographic.
|
|
38
|
-
sha2 = "0.
|
|
38
|
+
sha2 = "0.11"
|
|
39
39
|
|
|
40
40
|
# libc supplies geteuid for the cache-directory ownership check gating
|
|
41
41
|
# the unsafe artifact deserialize (see runtime/cache.rs); std exposes a
|
|
@@ -31,7 +31,7 @@ use magnus::{Error as MagnusError, Ruby};
|
|
|
31
31
|
use sha2::{Digest, Sha256};
|
|
32
32
|
use wasmtime::{Config as WtConfig, Engine as WtEngine, Module as WtModule};
|
|
33
33
|
|
|
34
|
-
use super::{setup_err, MODULE_NOT_BUILT_ERROR};
|
|
34
|
+
use super::errors::{setup_err, MODULE_NOT_BUILT_ERROR};
|
|
35
35
|
|
|
36
36
|
static SHARED_ENGINE: OnceLock<WtEngine> = OnceLock::new();
|
|
37
37
|
static MODULE_CACHE: OnceLock<Mutex<HashMap<PathBuf, WtModule>>> = OnceLock::new();
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//! Ruby error classes (lazy-resolved once the top-level Kobako error
|
|
2
|
+
//! hierarchy is loaded by `lib/kobako/errors.rb`) and the `*_err`
|
|
3
|
+
//! constructors every run-mechanics submodule shares. The ext raises
|
|
4
|
+
//! directly into the invocation-outcome taxonomy (`TrapError` and its
|
|
5
|
+
//! subclasses) for run-path failures and into the construction-layer
|
|
6
|
+
//! `SetupError` (and its `ModuleNotBuiltError` subclass) for `from_path`
|
|
7
|
+
//! setup failures — no engine-specific intermediate layer; the Sandbox
|
|
8
|
+
//! layer adds the verb prefix and lets the subclass identity flow through
|
|
9
|
+
//! unchanged.
|
|
10
|
+
|
|
11
|
+
use magnus::value::Lazy;
|
|
12
|
+
use magnus::{prelude::*, Error as MagnusError, ExceptionClass, RModule, Ruby};
|
|
13
|
+
|
|
14
|
+
/// Resolve `Kobako::<name>` as an `ExceptionClass` — the shared body of
|
|
15
|
+
/// every error-class `Lazy` below, which differ only in the constant
|
|
16
|
+
/// name. The constants are guaranteed present by the time any of these
|
|
17
|
+
/// lazies first resolve (`lib/kobako/errors.rb` loads the hierarchy before
|
|
18
|
+
/// the ext raises into it), so a missing constant is a build / wiring bug
|
|
19
|
+
/// and the `unwrap` is the correct fail-fast.
|
|
20
|
+
fn kobako_error_class(ruby: &Ruby, name: &str) -> ExceptionClass {
|
|
21
|
+
let kobako: RModule = ruby.class_object().const_get("Kobako").unwrap();
|
|
22
|
+
kobako.const_get(name).unwrap()
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
pub(crate) static SETUP_ERROR: Lazy<ExceptionClass> =
|
|
26
|
+
Lazy::new(|ruby| kobako_error_class(ruby, "SetupError"));
|
|
27
|
+
|
|
28
|
+
pub(crate) static MODULE_NOT_BUILT_ERROR: Lazy<ExceptionClass> =
|
|
29
|
+
Lazy::new(|ruby| kobako_error_class(ruby, "ModuleNotBuiltError"));
|
|
30
|
+
|
|
31
|
+
pub(crate) static TRAP_ERROR: Lazy<ExceptionClass> =
|
|
32
|
+
Lazy::new(|ruby| kobako_error_class(ruby, "TrapError"));
|
|
33
|
+
|
|
34
|
+
pub(crate) static TIMEOUT_ERROR: Lazy<ExceptionClass> =
|
|
35
|
+
Lazy::new(|ruby| kobako_error_class(ruby, "TimeoutError"));
|
|
36
|
+
|
|
37
|
+
pub(crate) static MEMORY_LIMIT_ERROR: Lazy<ExceptionClass> =
|
|
38
|
+
Lazy::new(|ruby| kobako_error_class(ruby, "MemoryLimitError"));
|
|
39
|
+
|
|
40
|
+
pub(crate) static SANDBOX_ERROR: Lazy<ExceptionClass> =
|
|
41
|
+
Lazy::new(|ruby| kobako_error_class(ruby, "SandboxError"));
|
|
42
|
+
|
|
43
|
+
/// Build a `MagnusError` in `class` carrying `msg` — the shared body of
|
|
44
|
+
/// the named `*_err` constructors below, which differ only in which
|
|
45
|
+
/// error-class `Lazy` they target.
|
|
46
|
+
fn error_in(ruby: &Ruby, class: &Lazy<ExceptionClass>, msg: impl Into<String>) -> MagnusError {
|
|
47
|
+
MagnusError::new(ruby.get_inner(class), msg.into())
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/// Construct a `Kobako::TrapError` magnus error. Used for every
|
|
51
|
+
/// invocation-time wasmtime engine failure that is not a configured-cap
|
|
52
|
+
/// trap — missing exports, allocation faults, memory write/read failures.
|
|
53
|
+
/// Construction-time setup failures use `setup_err`, not this.
|
|
54
|
+
pub(crate) fn trap_err(ruby: &Ruby, msg: impl Into<String>) -> MagnusError {
|
|
55
|
+
error_in(ruby, &TRAP_ERROR, msg)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/// Construct a `Kobako::SetupError` magnus error. Used for every
|
|
59
|
+
/// construction-time failure on the `Runtime.from_path` path before any
|
|
60
|
+
/// invocation runs — unreadable artifact, bytes that are not a valid Wasm
|
|
61
|
+
/// module, or engine / linker / instantiation setup failure. The
|
|
62
|
+
/// `ModuleNotBuiltError` subclass (artifact absent) is
|
|
63
|
+
/// raised through `MODULE_NOT_BUILT_ERROR` directly.
|
|
64
|
+
pub(crate) fn setup_err(ruby: &Ruby, msg: impl Into<String>) -> MagnusError {
|
|
65
|
+
error_in(ruby, &SETUP_ERROR, msg)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// Construct a `Kobako::TimeoutError` magnus error. Surfaces the
|
|
69
|
+
/// wall-clock cap path with the verb prefix added
|
|
70
|
+
/// by `Kobako::Sandbox#invoke!`.
|
|
71
|
+
pub(crate) fn timeout_err(ruby: &Ruby, msg: impl Into<String>) -> MagnusError {
|
|
72
|
+
error_in(ruby, &TIMEOUT_ERROR, msg)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/// Construct a `Kobako::MemoryLimitError` magnus error. Surfaces the
|
|
76
|
+
/// linear-memory cap path with the verb prefix
|
|
77
|
+
/// added by `Kobako::Sandbox#invoke!`.
|
|
78
|
+
pub(crate) fn memory_limit_err(ruby: &Ruby, msg: impl Into<String>) -> MagnusError {
|
|
79
|
+
error_in(ruby, &MEMORY_LIMIT_ERROR, msg)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/// Construct a `Kobako::SandboxError` magnus error. Used for the
|
|
83
|
+
/// host-side pre-call faults the SPEC attributes to the sandbox / wire
|
|
84
|
+
/// layer rather than the Wasm engine — currently the `#run` invocation
|
|
85
|
+
/// envelope reservation failure (`__kobako_alloc` returns 0).
|
|
86
|
+
/// The runtime is intact, so this must not be a
|
|
87
|
+
/// `TrapError`: no discard-and-recreate recovery is owed to the caller.
|
|
88
|
+
pub(crate) fn sandbox_err(ruby: &Ruby, msg: impl Into<String>) -> MagnusError {
|
|
89
|
+
error_in(ruby, &SANDBOX_ERROR, msg)
|
|
90
|
+
}
|