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
+5 -1
View File
@@ -62,9 +62,13 @@ fn resolve_gateway(
gateway_endpoint: &Option<String>,
) -> Result<GatewayContext> {
if let Some(endpoint) = gateway_endpoint {
// When a gateway name is explicitly provided (via flag or env var),
// trust it directly — don't require metadata to exist yet. This
// avoids a race condition where mTLS certs are stored under the
// real gateway name but the CLI falls back to using the raw
// endpoint URL (producing a mangled path like `https___...`).
let name = gateway_flag
.clone()
.filter(|name| get_gateway_metadata(name).is_some())
.or_else(|| find_gateway_by_endpoint(endpoint))
.unwrap_or_else(|| endpoint.clone());
return Ok(GatewayContext {