feat(vm): add openshell-vm crate with libkrun microVM gateway (#611)

This commit is contained in:
Drew Newberry
2026-04-08 22:00:01 -07:00
committed by GitHub
parent c2e5256725
commit ddb85b1704
56 changed files with 10972 additions and 61 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
BINARY="$PROJECT_ROOT/target/debug/openshell-vm"
cargo build --package openshell-vm --bin openshell-vm --quiet
# On macOS, codesign with the hypervisor entitlement so libkrun can use
# Apple's Hypervisor.framework. Re-sign after every build.
ENTITLEMENTS="$PROJECT_ROOT/crates/openshell-vm/entitlements.plist"
if [[ "$(uname)" == "Darwin" ]] && [[ -f "$ENTITLEMENTS" ]]; then
codesign --entitlements "$ENTITLEMENTS" --force -s - "$BINARY" 2>/dev/null
fi
exec "$BINARY" "$@"