microsandbox-rb 0.13.0 → 0.15.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/CHANGELOG.md +102 -1
- data/Cargo.lock +230 -258
- data/DESIGN.md +107 -18
- data/README.md +88 -12
- data/ext/microsandbox/Cargo.toml +23 -7
- data/ext/microsandbox/src/sandbox.rs +15 -2
- data/lib/microsandbox/ssh.rb +15 -2
- data/lib/microsandbox/version.rb +2 -2
- data/lib/microsandbox.rb +128 -10
- data/sig/microsandbox.rbs +3 -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: 241dfe5d94b8c98d3c790994698b004a591d66229d9965799fc5886b01e5a19d
|
|
4
|
+
data.tar.gz: a134b4cbb4b58a60d72d6a7ace30ab6333da4057d0868c1a6e351396b7ff4d00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c326c0481781ae1f3fc19994dfd8e4c004c4bdc8aa81b33e67386538f4fa9ff58cb84514955079c39daa09817c8eba65ac7d4ebe91ab34698ac5fce8cfa9c574
|
|
7
|
+
data.tar.gz: 1d93018f5982d2767cd66e29c50a195a3d138d7f60f93a2a3e6020384f41ce843e3a0b85d5152a2d17995a724ed9cc6169e72c0bcfc506017e7ae84b3acbe73f
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,106 @@ 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.15.0] - 2026-08-24
|
|
10
|
+
|
|
11
|
+
Adopts upstream runtime **`v0.6.9` → `v0.6.14`**, stepping through every
|
|
12
|
+
intermediate tag (v0.6.10, v0.6.11, v0.6.12, v0.6.13 each verified and
|
|
13
|
+
committed individually).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `ssh.open_client` and `ssh.prepare_server` accept `inactivity_timeout:` —
|
|
18
|
+
a per-session SSH inactivity timeout in seconds (upstream #1341, `v0.6.10`).
|
|
19
|
+
`nil` (the default) inherits the global config (600s out of the box), `0`
|
|
20
|
+
disables the timeout, and a negative or non-finite value raises
|
|
21
|
+
`ArgumentError`, matching the Python binding's `ValueError` semantics. The
|
|
22
|
+
SSH inactivity timeout stays separate from the sandbox lifecycle
|
|
23
|
+
`idle_timeout`.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Upstream runtime highlights carried without further Ruby surface:
|
|
28
|
+
- `v0.6.10` — bind-mount correctness (contained rootfs patches, parent-first
|
|
29
|
+
nested destinations, path formatting), guest bootstrap moved off the kernel
|
|
30
|
+
command line, DNS pins required for deferred domain allows, host-loopback
|
|
31
|
+
family fallback, configurable global ssh inactivity timeout.
|
|
32
|
+
- `v0.6.11` / `v0.6.12` — release-pipeline fixes (Linux glibc baseline
|
|
33
|
+
lowered to 2.28; bundled `msb` executable mode preserved), reflected in the
|
|
34
|
+
prebuilt bundles the companion binaries gem vendors.
|
|
35
|
+
- `v0.6.13` — legacy ext4 upper-disk resize support; temporary exec
|
|
36
|
+
sandboxes stopped on errors; `LocalBackendBuilder::try_build_lazy()` added
|
|
37
|
+
upstream (embedding-host API — not adopted here, matching the Python
|
|
38
|
+
binding; the ext stays on `LocalBackend::lazy()`).
|
|
39
|
+
- `v0.6.14` — `msb_krun` VMM stack bumped to 0.1.32.
|
|
40
|
+
|
|
41
|
+
## [0.14.0] - 2026-08-24
|
|
42
|
+
|
|
43
|
+
Runtime tag unchanged — still upstream **`v0.6.9`**.
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- **Companion gem `microsandbox-rb-binaries`** (source in `binaries/`): the
|
|
48
|
+
prebuilt `msb` microVM runtime and the `libkrunfw` firmware, shipped as one
|
|
49
|
+
gem per platform (`arm64-darwin`, `x86_64-linux-gnu`, `aarch64-linux-gnu`;
|
|
50
|
+
the Linux binaries are glibc-linked, hence `required_rubygems_version >=
|
|
51
|
+
3.3.11`). Install it alongside `microsandbox-rb` at the same version and your
|
|
52
|
+
bundle carries the runtime instead of downloading it into `~/.microsandbox`
|
|
53
|
+
on first use. There is no dependency edge in either direction — RubyGems has
|
|
54
|
+
no optional dependencies, and cloud-only users should not be made to fetch
|
|
55
|
+
~50 MB of binaries. Motivated by upstream
|
|
56
|
+
[superradcompany/microsandbox#1305](https://github.com/superradcompany/microsandbox/issues/1305).
|
|
57
|
+
- **A new tier in the runtime resolver.** `require "microsandbox"` activates the
|
|
58
|
+
companion gem (if installed at the same version and built for the same
|
|
59
|
+
upstream runtime) and hands
|
|
60
|
+
its `msb` to the core's set-once SDK slot; the firmware is found by the
|
|
61
|
+
runtime's `../lib` adjacency, exactly as in the Python/Node SDKs. The
|
|
62
|
+
effective order is now `MSB_PATH` → `microsandbox-rb-binaries` → config file →
|
|
63
|
+
`~/.microsandbox/bin/msb` → `msb` on `PATH`, and
|
|
64
|
+
`Microsandbox.runtime_path` reports the winner. Activation never raises: a
|
|
65
|
+
missing gem is silent, and a gem built for a *different* runtime is reported
|
|
66
|
+
with a warning and skipped rather than handed to the core.
|
|
67
|
+
- **Lock-step guard for the new gem.** `Microsandbox::Binaries::VERSION` must
|
|
68
|
+
equal `Microsandbox::VERSION` and `Microsandbox::Binaries::RUNTIME_VERSION`
|
|
69
|
+
must equal `Microsandbox::RUNTIME_VERSION`; `spec/unit/version_spec.rb`
|
|
70
|
+
asserts both, so a stale companion can't ship.
|
|
71
|
+
- **Vendoring/build pipeline** for the companion gem:
|
|
72
|
+
`rake -C binaries vendor[<platform>]` downloads the upstream release bundle and
|
|
73
|
+
verifies every file against that release's `checksums.sha256` as committed
|
|
74
|
+
in `binaries/checksums/<tag>.sha256` (fail-closed — a missing entry, a digest
|
|
75
|
+
mismatch, an unexpected file, or a live release file that disagrees with the
|
|
76
|
+
committed one aborts), `rake -C binaries build[<platform>]` re-verifies the staged tree
|
|
77
|
+
against its manifest before packaging, `rake -C binaries verify` runs the
|
|
78
|
+
vendored `msb` on the host, and `vendor:all` covers every platform from any
|
|
79
|
+
host. CI builds all three platform gems on every run, and `release.yml`
|
|
80
|
+
builds and publishes them on each version tag in a separate
|
|
81
|
+
`publish-binaries` job that runs after the SDK gem is live (a companion-gem
|
|
82
|
+
failure is its own red job and never blocks the SDK release; re-runs are
|
|
83
|
+
idempotent). The companion gem has its own RubyGems trusted-publisher entry.
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
|
|
87
|
+
- **The SDK gem is now SDK-only: nothing is provisioned at build or install
|
|
88
|
+
time.** The core crate's default `prebuilt` feature — whose `build.rs`
|
|
89
|
+
downloaded the *host* runtime into `~/.microsandbox` while compiling the
|
|
90
|
+
extension — is off (`default-features = false`, features `keyring`, `net`,
|
|
91
|
+
`ssh`, matching the official SDKs). The *guest* agent `agentd` is still
|
|
92
|
+
embedded into the extension at build time, via a direct
|
|
93
|
+
`microsandbox-runtime` dependency with just the `prebuilt` sub-feature that
|
|
94
|
+
fetches it. Host runtime provisioning is now the companion gem's job, with the
|
|
95
|
+
first-use download as fallback.
|
|
96
|
+
- **`Microsandbox.runtime_path=` is a no-op when the companion gem is active** —
|
|
97
|
+
it targets the same set-once slot the gem already claimed at load time. Use
|
|
98
|
+
the `MSB_PATH` environment variable to override a bundled runtime.
|
|
99
|
+
- **`Microsandbox.ensure_runtime!` skips the installer entirely** when the
|
|
100
|
+
resolved runtime is the companion gem's `msb`: those binaries are already the
|
|
101
|
+
matching version, so nothing is downloaded or touched in `~/.microsandbox`.
|
|
102
|
+
Without the gem, behaviour is unchanged — the version-correcting first-use
|
|
103
|
+
download into `~/.microsandbox` remains the lowest tier, still opt-out-able
|
|
104
|
+
with `MICROSANDBOX_NO_AUTO_INSTALL`.
|
|
105
|
+
- `Gemfile` now uses `gemspec glob: "{,*}.gemspec"` so Bundler resolves only the
|
|
106
|
+
root gemspec; its default glob would also evaluate the nested
|
|
107
|
+
`binaries/microsandbox-rb-binaries.gemspec` in every `bundle exec` process.
|
|
108
|
+
|
|
9
109
|
## [0.13.0] - 2026-08-18
|
|
10
110
|
|
|
11
111
|
Adopts upstream runtime **`v0.6.8` → `v0.6.9`**.
|
|
@@ -963,7 +1063,8 @@ microsandbox runtime, aligned with the official Python/Node/Go SDKs.
|
|
|
963
1063
|
core crate has Apple-native deps). Until precompiled gems are published,
|
|
964
1064
|
installing from source requires a Rust toolchain (stable >= 1.91).
|
|
965
1065
|
|
|
966
|
-
[Unreleased]: https://github.com/ya-luotao/microsandbox-rb/compare/v0.
|
|
1066
|
+
[Unreleased]: https://github.com/ya-luotao/microsandbox-rb/compare/v0.14.0...HEAD
|
|
1067
|
+
[0.14.0]: https://github.com/ya-luotao/microsandbox-rb/compare/v0.13.0...v0.14.0
|
|
967
1068
|
[0.9.0]: https://github.com/ya-luotao/microsandbox-rb/compare/v0.8.2...v0.9.0
|
|
968
1069
|
[0.8.2]: https://github.com/ya-luotao/microsandbox-rb/compare/v0.8.1...v0.8.2
|
|
969
1070
|
[0.8.1]: https://github.com/ya-luotao/microsandbox-rb/compare/v0.8.0...v0.8.1
|