microsandbox-rb 0.18.0 → 0.19.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 +16 -1
- data/Cargo.lock +1565 -1168
- data/README.md +3 -2
- data/docs/runtime.md +10 -11
- data/docs/surface.md +3 -1
- data/ext/microsandbox/Cargo.toml +4 -4
- data/ext/microsandbox/src/backend.rs +59 -75
- data/ext/microsandbox/src/exec.rs +79 -17
- data/ext/microsandbox/src/host_path.rs +2 -3
- data/ext/microsandbox/src/lib.rs +3 -6
- data/ext/microsandbox/src/sandbox.rs +86 -55
- data/ext/microsandbox/src/snapshot.rs +45 -43
- data/ext/microsandbox/src/storage.rs +2 -2
- data/ext/microsandbox/src/volume.rs +25 -22
- data/lib/microsandbox/sandbox.rb +4 -0
- data/lib/microsandbox/version.rb +2 -2
- data/lib/microsandbox.rb +7 -8
- data/sig/microsandbox.rbs +1 -0
- metadata +1 -1
data/lib/microsandbox.rb
CHANGED
|
@@ -130,9 +130,8 @@ module Microsandbox
|
|
|
130
130
|
if version
|
|
131
131
|
opts["version"] = version.to_s
|
|
132
132
|
unless version.to_s.delete_prefix("v") == sdk_runtime_version
|
|
133
|
-
warn "[microsandbox] setup(version: #{version.to_s.inspect}):
|
|
134
|
-
"#{sdk_runtime_version};
|
|
135
|
-
"at every local sandbox start"
|
|
133
|
+
warn "[microsandbox] setup(version: #{version.to_s.inspect}): the bundled runtime is " \
|
|
134
|
+
"#{sdk_runtime_version}; other releases must satisfy the launch capability checks"
|
|
136
135
|
end
|
|
137
136
|
end
|
|
138
137
|
opts["force"] = true if force
|
|
@@ -163,8 +162,8 @@ module Microsandbox
|
|
|
163
162
|
end
|
|
164
163
|
|
|
165
164
|
# Make sure local sandboxes can start: the runtime pair resolves and its
|
|
166
|
-
# `msb`
|
|
167
|
-
#
|
|
165
|
+
# `msb` matches the version this SDK bundles, or an explicit override
|
|
166
|
+
# has been reported for the caller to check. Called automatically by {Sandbox.create},
|
|
168
167
|
# {Sandbox.start} and the other calls that boot a microVM, so a freshly
|
|
169
168
|
# installed gem gets a working runtime without a manual {install} step.
|
|
170
169
|
#
|
|
@@ -179,7 +178,7 @@ module Microsandbox
|
|
|
179
178
|
# - the runtime home's own `msb` is another version: warn, then
|
|
180
179
|
# `install(force: true)` replaces the pair;
|
|
181
180
|
# - another source (`MSB_PATH`, configured paths) is another version:
|
|
182
|
-
# never touched — warn
|
|
181
|
+
# never touched — warn about the version mismatch;
|
|
183
182
|
# - a partial pair: raise with the files to delete or the variable to set.
|
|
184
183
|
#
|
|
185
184
|
# The local backend reads its runtime configuration (`MSB_HOME`,
|
|
@@ -563,7 +562,7 @@ module Microsandbox
|
|
|
563
562
|
false
|
|
564
563
|
end
|
|
565
564
|
|
|
566
|
-
#
|
|
565
|
+
# The runtime version bundled with this SDK.
|
|
567
566
|
def sdk_runtime_version = RUNTIME_VERSION.delete_prefix("v")
|
|
568
567
|
|
|
569
568
|
# The state of the runtime home itself — the exact two files the resolver
|
|
@@ -647,7 +646,7 @@ module Microsandbox
|
|
|
647
646
|
# and will not touch.
|
|
648
647
|
def warn_runtime_mismatch(info)
|
|
649
648
|
warn "[microsandbox] runtime #{info.version || "no embedded version (pre-0.7 msb or a wrapper script)"} " \
|
|
650
|
-
"at #{info.msb_path} ≠
|
|
649
|
+
"at #{info.msb_path} ≠ bundled runtime #{sdk_runtime_version}: launch compatibility is not guaranteed"
|
|
651
650
|
end
|
|
652
651
|
end
|
|
653
652
|
|
data/sig/microsandbox.rbs
CHANGED
|
@@ -395,6 +395,7 @@ module Microsandbox
|
|
|
395
395
|
def restart: (?force: bool, ?timeout: Numeric?, ?detached: bool) -> Sandbox
|
|
396
396
|
def destroy: (?force: bool, ?timeout: Numeric?) -> nil
|
|
397
397
|
def status: () -> Symbol
|
|
398
|
+
def local_runtime_version: () -> String?
|
|
398
399
|
def owns_lifecycle?: () -> bool
|
|
399
400
|
def detach: () -> nil
|
|
400
401
|
end
|