microsandbox-rb 0.16.0 → 0.17.1
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 +234 -1
- data/Cargo.lock +236 -201
- data/DESIGN.md +7 -38
- data/README.md +178 -626
- data/SECURITY.md +65 -0
- data/docs/configuration.md +154 -0
- data/docs/errors.md +74 -0
- data/docs/execution.md +101 -0
- data/docs/filesystem.md +45 -0
- data/docs/images.md +65 -0
- data/docs/lifecycle.md +108 -0
- data/docs/observability.md +99 -0
- data/docs/releasing.md +66 -0
- data/docs/runtime.md +152 -0
- data/docs/surface.md +70 -0
- data/ext/microsandbox/Cargo.toml +4 -4
- data/ext/microsandbox/src/error.rs +7 -0
- data/ext/microsandbox/src/host_path.rs +108 -0
- data/ext/microsandbox/src/lib.rs +1 -0
- data/ext/microsandbox/src/sandbox.rs +143 -31
- data/ext/microsandbox/src/volume.rs +43 -12
- data/lib/microsandbox/fs.rb +4 -8
- data/lib/microsandbox/image.rb +2 -2
- data/lib/microsandbox/log_entry.rb +1 -1
- data/lib/microsandbox/metrics.rb +1 -1
- data/lib/microsandbox/outbound_proxy.rb +340 -0
- data/lib/microsandbox/sandbox.rb +73 -10
- data/lib/microsandbox/snapshot.rb +1 -1
- data/lib/microsandbox/ssh.rb +2 -10
- data/lib/microsandbox/streams.rb +8 -5
- data/lib/microsandbox/version.rb +2 -2
- data/lib/microsandbox/volume.rb +31 -14
- data/lib/microsandbox-rb.rb +7 -0
- data/lib/microsandbox.rb +89 -31
- data/sig/microsandbox.rbs +40 -1
- metadata +15 -1
data/DESIGN.md
CHANGED
|
@@ -184,7 +184,7 @@ extension.
|
|
|
184
184
|
|
|
185
185
|
`ext/microsandbox/Cargo.toml` depends on the core crate via a **pinned git tag**
|
|
186
186
|
(`microsandbox` / `microsandbox-network`, pinned to the same tag as
|
|
187
|
-
`Microsandbox::RUNTIME_VERSION` — currently `v0.6.
|
|
187
|
+
`Microsandbox::RUNTIME_VERSION` — currently `v0.6.18`), so the gem builds anywhere
|
|
188
188
|
— CI, `rake-compiler-dock` release containers, and end-user source installs —
|
|
189
189
|
without an adjacent checkout. For fast local development against a sibling
|
|
190
190
|
microsandbox checkout, copy `.cargo/config.toml.example` to `.cargo/config.toml`
|
|
@@ -211,7 +211,7 @@ git. The override must never be committed — it would break container builds.
|
|
|
211
211
|
The job is gated to `workflow_dispatch` and **not** auto-published on tags:
|
|
212
212
|
since CI can't boot a microVM to prove a built gem actually works, gems are
|
|
213
213
|
promoted to the publish path manually after per-platform validation. Published
|
|
214
|
-
to RubyGems via Trusted Publishing (OIDC). See [
|
|
214
|
+
to RubyGems via Trusted Publishing (OIDC). See [docs/releasing.md](docs/releasing.md).
|
|
215
215
|
* **Runtime binaries gems** (`microsandbox-rb-binaries`): a distinct artifact
|
|
216
216
|
from the precompiled *extension* gems above — no Ruby code beyond a small
|
|
217
217
|
locator module, just the verified upstream `msb` + `libkrunfw` for one
|
|
@@ -232,42 +232,11 @@ git. The override must never be committed — it would break container builds.
|
|
|
232
232
|
|
|
233
233
|
## Implemented surface (v1) vs roadmap
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
`wait_until_stopped` (→ `SandboxStopResult`) controls — the v0.5.8 live-vs-handle
|
|
241
|
-
split that mirrors the official SDKs), backend routing (`set_default_backend`/
|
|
242
|
-
`with_backend`/`default_backend_kind`), block form), `exec`/`shell` with collected `ExecOutput`,
|
|
243
|
-
**streaming** `exec_stream`/`shell_stream` (`ExecHandle` is `Enumerable` over
|
|
244
|
-
`ExecEvent`s, with stdin sink + signal/kill/resize), the full guest filesystem
|
|
245
|
-
API (`fs.read`/`write`/`list`/`mkdir`/`remove`/`stat`/…), `metrics`,
|
|
246
|
-
`Microsandbox.all_sandbox_metrics`, **streaming `metrics_stream`/`log_stream`**
|
|
247
|
-
(`Enumerable` over `Metrics`/`LogEntry`), `logs`,
|
|
248
|
-
**OCI image-cache management** (`Image.get`/`list`/`inspect`/`remove`/`prune`),
|
|
249
|
-
**named volumes** (`Volume.create`/`get`/`list`/`remove` + `volumes:` mounts),
|
|
250
|
-
**snapshots** (`Snapshot.create`/`get`/`list`/`remove`/`verify`/`export`/`import`
|
|
251
|
-
+ `from_snapshot:` boot), **rootfs patches** (`Patch.text`/`file`/`append`/
|
|
252
|
-
`copy_file`/`copy_dir`/`symlink`/`mkdir`/`remove` via `create(patches:)`),
|
|
253
|
-
**custom per-rule network policies** (`NetworkPolicy`/`Rule`/`Destination` —
|
|
254
|
-
CIDR/IP/domain/suffix/group allow-deny rules with per-direction defaults and
|
|
255
|
-
bulk domain denials, alongside the presets), interactive **`attach`/
|
|
256
|
-
`attach_shell`** (host-TTY coupled — raw mode + SIGWINCH), **SSH**
|
|
257
|
-
(`Sandbox#ssh` → `SshClient`/`SftpClient`/`SshServer`), the **raw agent client**
|
|
258
|
-
(`AgentClient` → `AgentStream`/`AgentFrame`),
|
|
259
|
-
`version`/`install`/`installed?`/`ensure_runtime!`, **registry auth**
|
|
260
|
-
(`registry_auth`/`registry_insecure`/`registry_ca_certs` on `create`, for
|
|
261
|
-
private/authenticated registries), and the typed error hierarchy.
|
|
262
|
-
|
|
263
|
-
Create options now cover `image`, `cpus`, `memory`, `oci_upper_size`, `env`,
|
|
264
|
-
`workdir`, `shell`, `user`, `hostname`, `labels`, `scripts`, `entrypoint`,
|
|
265
|
-
`ports`/`ports_udp`, `volumes`, `patches`, `network` (policy presets
|
|
266
|
-
`public_only`/`none`/`allow_all`/`non_local`, or a custom `NetworkPolicy`/Hash),
|
|
267
|
-
`log_level`, `quiet_logs`, `security`, `max_duration`, `idle_timeout`, `rlimits`,
|
|
268
|
-
`pull_policy`, `registry_auth`/`registry_insecure`/`registry_ca_certs`,
|
|
269
|
-
`secrets`, `from_snapshot`, `detached`, and `replace`/`replace_with_timeout`.
|
|
270
|
-
`exec`/`shell` add per-call `rlimits`.
|
|
235
|
+
The authoritative, up-to-date scope statement — every implemented API family,
|
|
236
|
+
the full create-option list, and the handful of upstream knobs not yet exposed —
|
|
237
|
+
lives in [docs/surface.md](docs/surface.md), with the typed counterpart in
|
|
238
|
+
`sig/microsandbox.rbs`. It is maintained there (and only there) so this file
|
|
239
|
+
and the README cannot drift from each other.
|
|
271
240
|
|
|
272
241
|
## Verification
|
|
273
242
|
|