microsandbox-rb 0.9.0 → 0.9.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/CHANGELOG.md +49 -0
- data/Cargo.lock +34 -27
- data/DESIGN.md +2 -2
- data/README.md +5 -3
- data/ext/microsandbox/Cargo.toml +4 -4
- data/ext/microsandbox/src/image.rs +5 -5
- data/ext/microsandbox/src/lib.rs +2 -2
- data/lib/microsandbox/sandbox.rb +1 -1
- data/lib/microsandbox/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 69a06d8d3c54bdd0339a3149904ac906377ddcc3aa295725548ceac20001b1ae
|
|
4
|
+
data.tar.gz: ca7b9c5ed1ca3d35bec0b2229db7f1f229b58964f89c48e386e187d8d7bb0dd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d11c9b6a98de5c66b4d0fda89d7b8efe3610d68408e96664707f150cb358bb3ca9e6550acf684e12e9989cf70211a79a45b7dc5603f4d6b0861be41c4528690
|
|
7
|
+
data.tar.gz: dfe032911a9207ba074a47bc9065c0e78f45537b4b3fd9d8059f9e08def6211c35e6a5fcfd93ebc26fe9f7dda818924d298274c7d99d91ee00cfc63b61c44865
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,55 @@ All notable changes to this gem are documented here. The format is based on
|
|
|
6
6
|
microsandbox runtime it embeds; each release notes the upstream runtime tag it
|
|
7
7
|
wraps, and the README's Versioning section keeps the full gem→runtime map.
|
|
8
8
|
|
|
9
|
+
## [0.9.2] - 2026-07-08
|
|
10
|
+
|
|
11
|
+
Adopts upstream runtime **`v0.6.2` → `v0.6.3`**. No Ruby API change; the
|
|
12
|
+
native glue moves to the explicit-backend variants of a few SDK calls that
|
|
13
|
+
went "ambient config" upstream (#1091).
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **DNS no longer advertises unreachable address families to the guest**
|
|
18
|
+
(upstream #1083): on hosts without a working IPv6 route the sandbox is
|
|
19
|
+
IPv4-only, but the DNS forwarder previously still returned real AAAA
|
|
20
|
+
records, so v6-preferring resolvers inside the guest (gRPC/c-ares
|
|
21
|
+
foremost) tried IPv6 first and failed with unreachable-network errors.
|
|
22
|
+
AAAA queries in a v4-only sandbox (and A queries in a v6-only one) now
|
|
23
|
+
synthesize an empty NOERROR answer, steering guests to the usable family.
|
|
24
|
+
Also normalizes IPv4-mapped IPv6 addresses for policy/rebind/resolved-
|
|
25
|
+
hostname checks.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- **Embedded runtime is now `v0.6.3`** (`Microsandbox::RUNTIME_VERSION` /
|
|
30
|
+
`Microsandbox.runtime_version`). Also inherited: upstream TLS interception
|
|
31
|
+
scopes upstream-certificate verification per destination (#1073).
|
|
32
|
+
- Native glue adapted to the upstream v0.6.3 SDK surface (#1091 restored
|
|
33
|
+
"ambient local config" as the public shape): `Image.get/list/inspect/
|
|
34
|
+
remove/prune` and `all_sandbox_metrics` now call the explicit
|
|
35
|
+
`*_local(backend, …)` variants, and the resolved-`msb`-path probe uses the
|
|
36
|
+
`LocalConfig#resolve_msb_path` method form. Behavior is identical — the
|
|
37
|
+
gem already held an explicit local backend at every call site.
|
|
38
|
+
|
|
39
|
+
## [0.9.1] - 2026-07-03
|
|
40
|
+
|
|
41
|
+
Adopts upstream runtime **`v0.6.1` → `v0.6.2`**. The upstream SDK crate's public
|
|
42
|
+
API is unchanged in this release — the only surface change attempted upstream (a
|
|
43
|
+
`disk_size` builder rename, #983) was reverted before the release cut (#1078) —
|
|
44
|
+
so this is a pure runtime bump with no Ruby API change.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **Embedded runtime is now `v0.6.2`** (`Microsandbox::RUNTIME_VERSION` /
|
|
49
|
+
`Microsandbox.runtime_version`). Upstream improvements inherited by the gem:
|
|
50
|
+
- **Faster image loads and pulls** (upstream #1075): an early cache gate skips
|
|
51
|
+
already-imported layers and OCI layer decompression switches to zlib-rs.
|
|
52
|
+
Inherited transitively through the SDK crate's `microsandbox-image`
|
|
53
|
+
dependency, so `Sandbox.create` image pulls benefit directly.
|
|
54
|
+
- `msb` CLI polish (terminal-aware help colors, aligned `doctor` runtime
|
|
55
|
+
diagnostics, image-load progress) ships in the prebuilt runtime binary but
|
|
56
|
+
does not affect the Ruby API surface.
|
|
57
|
+
|
|
9
58
|
## [0.9.0] - 2026-06-29
|
|
10
59
|
|
|
11
60
|
Adopts upstream runtime **`v0.5.10` → `v0.6.1`** (spanning the upstream `v0.6.0`
|
data/Cargo.lock
CHANGED
|
@@ -1697,6 +1697,7 @@ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
|
|
|
1697
1697
|
dependencies = [
|
|
1698
1698
|
"crc32fast",
|
|
1699
1699
|
"miniz_oxide",
|
|
1700
|
+
"zlib-rs",
|
|
1700
1701
|
]
|
|
1701
1702
|
|
|
1702
1703
|
[[package]]
|
|
@@ -2974,8 +2975,8 @@ dependencies = [
|
|
|
2974
2975
|
|
|
2975
2976
|
[[package]]
|
|
2976
2977
|
name = "microsandbox"
|
|
2977
|
-
version = "0.6.
|
|
2978
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
2978
|
+
version = "0.6.3"
|
|
2979
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
2979
2980
|
dependencies = [
|
|
2980
2981
|
"anyhow",
|
|
2981
2982
|
"astral-tokio-tar",
|
|
@@ -3028,8 +3029,8 @@ dependencies = [
|
|
|
3028
3029
|
|
|
3029
3030
|
[[package]]
|
|
3030
3031
|
name = "microsandbox-agent-client"
|
|
3031
|
-
version = "0.6.
|
|
3032
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3032
|
+
version = "0.6.3"
|
|
3033
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3033
3034
|
dependencies = [
|
|
3034
3035
|
"ciborium",
|
|
3035
3036
|
"microsandbox-protocol",
|
|
@@ -3041,8 +3042,8 @@ dependencies = [
|
|
|
3041
3042
|
|
|
3042
3043
|
[[package]]
|
|
3043
3044
|
name = "microsandbox-db"
|
|
3044
|
-
version = "0.6.
|
|
3045
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3045
|
+
version = "0.6.3"
|
|
3046
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3046
3047
|
dependencies = [
|
|
3047
3048
|
"async-trait",
|
|
3048
3049
|
"sea-orm",
|
|
@@ -3053,8 +3054,8 @@ dependencies = [
|
|
|
3053
3054
|
|
|
3054
3055
|
[[package]]
|
|
3055
3056
|
name = "microsandbox-filesystem"
|
|
3056
|
-
version = "0.6.
|
|
3057
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3057
|
+
version = "0.6.3"
|
|
3058
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3058
3059
|
dependencies = [
|
|
3059
3060
|
"libc",
|
|
3060
3061
|
"microsandbox-utils",
|
|
@@ -3066,8 +3067,8 @@ dependencies = [
|
|
|
3066
3067
|
|
|
3067
3068
|
[[package]]
|
|
3068
3069
|
name = "microsandbox-image"
|
|
3069
|
-
version = "0.6.
|
|
3070
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3070
|
+
version = "0.6.3"
|
|
3071
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3071
3072
|
dependencies = [
|
|
3072
3073
|
"astral-tokio-tar",
|
|
3073
3074
|
"async-compression",
|
|
@@ -3092,8 +3093,8 @@ dependencies = [
|
|
|
3092
3093
|
|
|
3093
3094
|
[[package]]
|
|
3094
3095
|
name = "microsandbox-metrics"
|
|
3095
|
-
version = "0.6.
|
|
3096
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3096
|
+
version = "0.6.3"
|
|
3097
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3097
3098
|
dependencies = [
|
|
3098
3099
|
"chrono",
|
|
3099
3100
|
"libc",
|
|
@@ -3104,8 +3105,8 @@ dependencies = [
|
|
|
3104
3105
|
|
|
3105
3106
|
[[package]]
|
|
3106
3107
|
name = "microsandbox-migration"
|
|
3107
|
-
version = "0.6.
|
|
3108
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3108
|
+
version = "0.6.3"
|
|
3109
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3109
3110
|
dependencies = [
|
|
3110
3111
|
"sea-orm-migration",
|
|
3111
3112
|
"serde_json",
|
|
@@ -3113,8 +3114,8 @@ dependencies = [
|
|
|
3113
3114
|
|
|
3114
3115
|
[[package]]
|
|
3115
3116
|
name = "microsandbox-network"
|
|
3116
|
-
version = "0.6.
|
|
3117
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3117
|
+
version = "0.6.3"
|
|
3118
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3118
3119
|
dependencies = [
|
|
3119
3120
|
"base64",
|
|
3120
3121
|
"bytes",
|
|
@@ -3155,8 +3156,8 @@ dependencies = [
|
|
|
3155
3156
|
|
|
3156
3157
|
[[package]]
|
|
3157
3158
|
name = "microsandbox-protocol"
|
|
3158
|
-
version = "0.6.
|
|
3159
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3159
|
+
version = "0.6.3"
|
|
3160
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3160
3161
|
dependencies = [
|
|
3161
3162
|
"chrono",
|
|
3162
3163
|
"ciborium",
|
|
@@ -3170,8 +3171,8 @@ dependencies = [
|
|
|
3170
3171
|
|
|
3171
3172
|
[[package]]
|
|
3172
3173
|
name = "microsandbox-runtime"
|
|
3173
|
-
version = "0.6.
|
|
3174
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3174
|
+
version = "0.6.3"
|
|
3175
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3175
3176
|
dependencies = [
|
|
3176
3177
|
"bytes",
|
|
3177
3178
|
"chrono",
|
|
@@ -3201,8 +3202,8 @@ dependencies = [
|
|
|
3201
3202
|
|
|
3202
3203
|
[[package]]
|
|
3203
3204
|
name = "microsandbox-types"
|
|
3204
|
-
version = "0.6.
|
|
3205
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3205
|
+
version = "0.6.3"
|
|
3206
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3206
3207
|
dependencies = [
|
|
3207
3208
|
"chrono",
|
|
3208
3209
|
"serde",
|
|
@@ -3213,8 +3214,8 @@ dependencies = [
|
|
|
3213
3214
|
|
|
3214
3215
|
[[package]]
|
|
3215
3216
|
name = "microsandbox-utils"
|
|
3216
|
-
version = "0.6.
|
|
3217
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3217
|
+
version = "0.6.3"
|
|
3218
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.3#7121a8c3385252d9a9ec83677fea5a49a475cdb2"
|
|
3218
3219
|
dependencies = [
|
|
3219
3220
|
"dirs",
|
|
3220
3221
|
"libc",
|
|
@@ -3226,7 +3227,7 @@ dependencies = [
|
|
|
3226
3227
|
|
|
3227
3228
|
[[package]]
|
|
3228
3229
|
name = "microsandbox_rb"
|
|
3229
|
-
version = "0.9.
|
|
3230
|
+
version = "0.9.2"
|
|
3230
3231
|
dependencies = [
|
|
3231
3232
|
"chrono",
|
|
3232
3233
|
"futures",
|
|
@@ -3300,9 +3301,9 @@ dependencies = [
|
|
|
3300
3301
|
|
|
3301
3302
|
[[package]]
|
|
3302
3303
|
name = "msb-imago"
|
|
3303
|
-
version = "0.1.
|
|
3304
|
+
version = "0.1.1"
|
|
3304
3305
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3305
|
-
checksum = "
|
|
3306
|
+
checksum = "c3077f41d73d78575dd706fcb626778eea7942ab2f1402ec040a4e11badc5dfa"
|
|
3306
3307
|
dependencies = [
|
|
3307
3308
|
"async-trait",
|
|
3308
3309
|
"bincode",
|
|
@@ -7418,6 +7419,12 @@ dependencies = [
|
|
|
7418
7419
|
"syn",
|
|
7419
7420
|
]
|
|
7420
7421
|
|
|
7422
|
+
[[package]]
|
|
7423
|
+
name = "zlib-rs"
|
|
7424
|
+
version = "0.6.5"
|
|
7425
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
7426
|
+
checksum = "5431d5661c32445236631278f27946e444ddafe4684cac70b185272d4f9c52d5"
|
|
7427
|
+
|
|
7421
7428
|
[[package]]
|
|
7422
7429
|
name = "zmij"
|
|
7423
7430
|
version = "1.0.21"
|
data/DESIGN.md
CHANGED
|
@@ -106,7 +106,7 @@ out (air-gapped hosts that provision out of band). libkrunfw is `dlopen`'d by
|
|
|
106
106
|
|
|
107
107
|
`ext/microsandbox/Cargo.toml` depends on the core crate via a **pinned git tag**
|
|
108
108
|
(`microsandbox` / `microsandbox-network`, pinned to the same tag as
|
|
109
|
-
`Microsandbox::RUNTIME_VERSION` — currently `v0.6.
|
|
109
|
+
`Microsandbox::RUNTIME_VERSION` — currently `v0.6.2`), so the gem builds anywhere
|
|
110
110
|
— CI, `rake-compiler-dock` release containers, and end-user source installs —
|
|
111
111
|
without an adjacent checkout. For fast local development against a sibling
|
|
112
112
|
microsandbox checkout, copy `.cargo/config.toml.example` to `.cargo/config.toml`
|
|
@@ -211,7 +211,7 @@ create options, full mount options (tmpfs/disk + stat-virtualization/
|
|
|
211
211
|
host-permissions), and snapshot inspection (`open`/`list_dir`/`reindex`).
|
|
212
212
|
|
|
213
213
|
A few **secondary** upstream knobs remain unexposed (a genuine binding gap, not
|
|
214
|
-
upstream-gated — they exist at the pinned `v0.6.
|
|
214
|
+
upstream-gated — they exist at the pinned `v0.6.2` runtime): per-published-port host
|
|
215
215
|
**bind address** (ports always bind loopback), network **interface overrides**,
|
|
216
216
|
and inline **named-volume create-mode** (pre-create with `Volume.create`, then
|
|
217
217
|
mount with `{ named: }`). These slot in module-by-module exactly as the existing
|
data/README.md
CHANGED
|
@@ -215,7 +215,7 @@ end
|
|
|
215
215
|
|
|
216
216
|
```ruby
|
|
217
217
|
Microsandbox::Sandbox.create("obs", image: "public.ecr.aws/docker/library/alpine:latest") do |sb|
|
|
218
|
-
# On
|
|
218
|
+
# On v0.6.x runtimes the metrics slot goes live a beat after create returns,
|
|
219
219
|
# so `metrics` can briefly raise "no live metrics slot" right after boot —
|
|
220
220
|
# retry for a few hundred ms rather than treating the first failure as fatal.
|
|
221
221
|
m = sb.metrics # => Microsandbox::Metrics
|
|
@@ -393,8 +393,8 @@ change diverged the two numbers — the gem version is **not** a reliable indica
|
|
|
393
393
|
of the embedded runtime version. To learn which runtime a build wraps, ask it:
|
|
394
394
|
|
|
395
395
|
```ruby
|
|
396
|
-
Microsandbox::VERSION # => "0.9.
|
|
397
|
-
Microsandbox.runtime_version # => "v0.6.
|
|
396
|
+
Microsandbox::VERSION # => "0.9.2" (the gem's own version)
|
|
397
|
+
Microsandbox.runtime_version # => "v0.6.3" (the embedded upstream runtime tag)
|
|
398
398
|
```
|
|
399
399
|
|
|
400
400
|
| Gem version | Upstream runtime | Notes |
|
|
@@ -411,6 +411,8 @@ Microsandbox.runtime_version # => "v0.6.1" (the embedded upstream runtime tag
|
|
|
411
411
|
| `0.8.1` | `v0.5.10` | gem-only: re-provision a stale local runtime; per-bind-mount `quota_mib:` override |
|
|
412
412
|
| `0.8.2` | `v0.5.10` | gem-only: redact secrets from errors, typed snapshot errors, panic-free durations, fat-gem loader + `extconf` preflight fixes, threading/streaming docs |
|
|
413
413
|
| `0.9.0` | `v0.6.1` | adopts upstream `v0.6.0`+`v0.6.1` (zombie-runtime wait fix, secret substitution through CONNECT proxies, stale-sandbox cleanup); upstream public API is additive — no Ruby surface change |
|
|
414
|
+
| `0.9.1` | `v0.6.2` | adopts upstream `v0.6.2` (faster image loads/pulls via early cache gate + zlib-rs); upstream API unchanged — no Ruby surface change |
|
|
415
|
+
| `0.9.2` | `v0.6.3` | adopts upstream `v0.6.3` (v4-only sandboxes stop advertising AAAA DNS answers — fixes guest gRPC/c-ares preferring unreachable IPv6; scoped upstream TLS verification); glue moves to `*_local` SDK variants — no Ruby surface change |
|
|
414
416
|
|
|
415
417
|
**Going forward** — the gem version moves on its own semver track and no longer
|
|
416
418
|
mirrors the upstream tag:
|
data/ext/microsandbox/Cargo.toml
CHANGED
|
@@ -6,8 +6,8 @@ name = "microsandbox_rb"
|
|
|
6
6
|
description = "Ruby SDK native extension for microsandbox — secure, fast microVM-based sandboxing."
|
|
7
7
|
# Must equal Microsandbox::VERSION (lib/microsandbox/version.rb) — Native.version
|
|
8
8
|
# returns this via env!("CARGO_PKG_VERSION") and version_spec.rb asserts equality.
|
|
9
|
-
# The core-crate dependency below stays pinned at its own tag (v0.6.
|
|
10
|
-
version = "0.9.
|
|
9
|
+
# The core-crate dependency below stays pinned at its own tag (v0.6.3).
|
|
10
|
+
version = "0.9.2"
|
|
11
11
|
authors = ["Super Rad Company <development@superrad.company>"]
|
|
12
12
|
repository = "https://github.com/superradcompany/microsandbox"
|
|
13
13
|
license = "Apache-2.0"
|
|
@@ -35,8 +35,8 @@ rb-sys = "0.9"
|
|
|
35
35
|
# `.cargo/config.toml.example`). "ssh" matches the feature set the Python/Node
|
|
36
36
|
# SDKs ship with; default features add "prebuilt" (provisions msb + libkrunfw at
|
|
37
37
|
# build time), "net", and "keyring".
|
|
38
|
-
microsandbox = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
39
|
-
microsandbox-network = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
38
|
+
microsandbox = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.3", default-features = true, features = ["ssh"] }
|
|
39
|
+
microsandbox-network = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.3" }
|
|
40
40
|
|
|
41
41
|
# Async core bridged to Ruby's synchronous API via a blocking tokio runtime.
|
|
42
42
|
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time"] }
|
|
@@ -82,12 +82,12 @@ fn report_to_hash(report: ImagePruneReport) -> RHash {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
fn get(reference: String) -> Result<RHash, Error> {
|
|
85
|
-
let handle = with_local_backend(async |local| Image::
|
|
85
|
+
let handle = with_local_backend(async |local| Image::get_local(local, &reference).await)?;
|
|
86
86
|
Ok(handle_to_hash(&handle))
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
fn list() -> Result<RArray, Error> {
|
|
90
|
-
let handles = with_local_backend(async |local| Image::
|
|
90
|
+
let handles = with_local_backend(async |local| Image::list_local(local).await)?;
|
|
91
91
|
let arr = ruby().ary_new();
|
|
92
92
|
for h in handles.iter() {
|
|
93
93
|
arr.push(handle_to_hash(h))?;
|
|
@@ -96,16 +96,16 @@ fn list() -> Result<RArray, Error> {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
fn inspect(reference: String) -> Result<RHash, Error> {
|
|
99
|
-
let detail = with_local_backend(async |local| Image::
|
|
99
|
+
let detail = with_local_backend(async |local| Image::inspect_local(local, &reference).await)?;
|
|
100
100
|
Ok(detail_to_hash(detail))
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
fn remove(reference: String, force: bool) -> Result<(), Error> {
|
|
104
|
-
with_local_backend(async |local| Image::
|
|
104
|
+
with_local_backend(async |local| Image::remove_local(local, &reference, force).await)
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
fn prune() -> Result<RHash, Error> {
|
|
108
|
-
let report = with_local_backend(async |local| Image::
|
|
108
|
+
let report = with_local_backend(async |local| Image::prune_local(local).await)?;
|
|
109
109
|
Ok(report_to_hash(report))
|
|
110
110
|
}
|
|
111
111
|
|
data/ext/microsandbox/src/lib.rs
CHANGED
|
@@ -34,7 +34,7 @@ fn version() -> String {
|
|
|
34
34
|
/// helpers (Python/Node/Go).
|
|
35
35
|
fn all_sandbox_metrics() -> Result<RHash, Error> {
|
|
36
36
|
let map = backend::with_local_backend(async |local| {
|
|
37
|
-
microsandbox::sandbox::
|
|
37
|
+
microsandbox::sandbox::all_sandbox_metrics_local(local).await
|
|
38
38
|
})?;
|
|
39
39
|
let hash = runtime::ruby().hash_new();
|
|
40
40
|
for (name, metrics) in &map {
|
|
@@ -113,7 +113,7 @@ fn resolved_msb_path() -> Result<String, Error> {
|
|
|
113
113
|
available_when: "with the local backend".into(),
|
|
114
114
|
})
|
|
115
115
|
})?;
|
|
116
|
-
let path =
|
|
116
|
+
let path = local.config().resolve_msb_path().map_err(error::to_ruby)?;
|
|
117
117
|
Ok(path.to_string_lossy().into_owned())
|
|
118
118
|
}
|
|
119
119
|
|
data/lib/microsandbox/sandbox.rb
CHANGED
|
@@ -931,7 +931,7 @@ module Microsandbox
|
|
|
931
931
|
#
|
|
932
932
|
# Raises a {Microsandbox::Error} ("sandbox N has no live metrics slot") when
|
|
933
933
|
# called in the brief window right after {Sandbox.create} returns, before the
|
|
934
|
-
# runtime has registered the sandbox's metrics slot. On
|
|
934
|
+
# runtime has registered the sandbox's metrics slot. On `v0.6.x` runtimes
|
|
935
935
|
# the spawn handshake no longer blocks create until the first sample is
|
|
936
936
|
# written, so the slot goes live a beat *after* boot (within a few hundred
|
|
937
937
|
# milliseconds); retry for that window rather than treating the first failure
|
data/lib/microsandbox/version.rb
CHANGED
|
@@ -8,12 +8,12 @@ module Microsandbox
|
|
|
8
8
|
# Versioning section of the README for the full gem-to-runtime map. Must equal
|
|
9
9
|
# the native ext's Cargo crate version (`Native.version`), enforced by
|
|
10
10
|
# spec/unit/version_spec.rb.
|
|
11
|
-
VERSION = "0.9.
|
|
11
|
+
VERSION = "0.9.2"
|
|
12
12
|
|
|
13
13
|
# The upstream microsandbox runtime release this gem build embeds — the `tag`
|
|
14
14
|
# pinned on the `microsandbox`/`microsandbox-network` git deps in
|
|
15
15
|
# ext/microsandbox/Cargo.toml. Exposed at runtime as
|
|
16
16
|
# {Microsandbox.runtime_version}. spec/unit/version_spec.rb asserts it stays in
|
|
17
17
|
# sync with the Cargo tag so it can't silently drift out of date.
|
|
18
|
-
RUNTIME_VERSION = "v0.6.
|
|
18
|
+
RUNTIME_VERSION = "v0.6.3"
|
|
19
19
|
end
|