Skip to content

Commit 92d003e

Browse files
feat: add vz run / vz stop for gpu-cli-style dev environments
Adds top-level `vz run <cmd>` that reads `vz.json`, boots a Linux VM via the daemon, mounts the project directory via VirtioFS, and executes commands inside the VM. The VM stays alive between runs (22ms warm exec) until `vz stop`. Stack changes: - Proto: VolumeMount message + fields on CreateSandboxRequest - Runtime contract: guest_path on StackVolumeMount - Daemon: explicit mount support in sandbox creation, container bind mounts - VM boot: kernel cmdline generation for mount target paths - OCI bundle: skip host-side path creation for guest-only paths - Release: build + sign + notarize vz-runtimed - Install script: downloads vz-runtimed, version tracking, upgrade support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8271070 commit 92d003e

File tree

25 files changed

+1016
-62
lines changed

25 files changed

+1016
-62
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
run: |
6161
cd crates
6262
cargo build --release -p vz-cli
63+
cargo build --release -p vz-runtimed
6364
cargo build --release -p vz-guest-agent
6465
6566
- name: Import code signing certificate
@@ -103,26 +104,50 @@ jobs:
103104
codesign --verify --verbose crates/target/release/vz
104105
echo "vz-cli signed successfully"
105106
107+
- name: Sign vz-runtimed with Developer ID
108+
env:
109+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
110+
run: |
111+
codesign --sign "$APPLE_SIGNING_IDENTITY" \
112+
--keychain "$KEYCHAIN_PATH" \
113+
--entitlements entitlements/vz-cli.entitlements.plist \
114+
--options runtime \
115+
--timestamp \
116+
--force \
117+
crates/target/release/vz-runtimed
118+
119+
codesign --verify --verbose crates/target/release/vz-runtimed
120+
echo "vz-runtimed signed successfully"
121+
106122
- name: Sign vz-guest-agent (ad-hoc, no entitlements)
107123
run: |
108124
codesign --sign - --force crates/target/release/vz-guest-agent
109125
codesign --verify --verbose crates/target/release/vz-guest-agent
110126
111-
- name: Notarize vz-cli
127+
- name: Notarize vz-cli and vz-runtimed
112128
env:
113129
APPLE_ID: ${{ secrets.APPLE_ID }}
114130
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
115131
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
116132
run: |
133+
# Notarize vz-cli
117134
ditto -c -k --keepParent crates/target/release/vz vz-notarize.zip
118-
119135
xcrun notarytool submit vz-notarize.zip \
120136
--apple-id "$APPLE_ID" \
121137
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
122138
--team-id "$APPLE_TEAM_ID" \
123139
--wait
124-
125140
rm vz-notarize.zip
141+
142+
# Notarize vz-runtimed
143+
ditto -c -k --keepParent crates/target/release/vz-runtimed vz-runtimed-notarize.zip
144+
xcrun notarytool submit vz-runtimed-notarize.zip \
145+
--apple-id "$APPLE_ID" \
146+
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
147+
--team-id "$APPLE_TEAM_ID" \
148+
--wait
149+
rm vz-runtimed-notarize.zip
150+
126151
echo "Notarization complete"
127152
128153
- name: Prepare release artifacts
@@ -136,6 +161,10 @@ jobs:
136161
chmod +x "dist/vz-v${VERSION}-darwin-arm64"
137162
shasum -a 256 "dist/vz-v${VERSION}-darwin-arm64" > "dist/vz-v${VERSION}-darwin-arm64.sha256"
138163
164+
cp crates/target/release/vz-runtimed "dist/vz-runtimed-v${VERSION}-darwin-arm64"
165+
chmod +x "dist/vz-runtimed-v${VERSION}-darwin-arm64"
166+
shasum -a 256 "dist/vz-runtimed-v${VERSION}-darwin-arm64" > "dist/vz-runtimed-v${VERSION}-darwin-arm64.sha256"
167+
139168
cp crates/target/release/vz-guest-agent "dist/vz-guest-agent-v${VERSION}-darwin-arm64"
140169
chmod +x "dist/vz-guest-agent-v${VERSION}-darwin-arm64"
141170
shasum -a 256 "dist/vz-guest-agent-v${VERSION}-darwin-arm64" > "dist/vz-guest-agent-v${VERSION}-darwin-arm64.sha256"

crates/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/vz-api/src/daemon_bridge/sandbox.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub(crate) async fn try_create_sandbox_via_daemon(
9090
cpus: body.cpus.unwrap_or(0) as u32,
9191
memory_mb: body.memory_mb.unwrap_or(0),
9292
labels,
93+
..Default::default()
9394
};
9495

9596
match client.create_sandbox_with_metadata(grpc_request).await {

crates/vz-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vz-cli"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "CLI for managing containers and macOS VM sandboxes"
55
edition.workspace = true
66
rust-version.workspace = true

0 commit comments

Comments
 (0)