Skip to main content
Local sandboxes use the msb executable and libkrunfw library. Depending on the SDK and installation method, those runtime files may already be bundled or may need to be downloaded. Each SDK exposes helpers that let an application verify the runtime before creating its first sandbox. The default install root is ~/.microsandbox/ (%USERPROFILE%\.microsandbox on Windows). Explicit setup is useful when you want installation failures to surface at process startup or when you are preparing an offline environment.

Install and verify

Check for the runtime and install it only when needed. These installation helpers are idempotent and reuse a matching installation.

Customize installation

Rust and TypeScript expose builders for custom install roots, versions, verification, and forced downloads. Go exposes WithSkipDownload() for pre-provisioned or air-gapped environments. Python’s setup helper uses the default installation behavior.
In Go, WithSkipDownload() returns a SetupOption, whose exported type is func(*setupConfig). Options apply only to the first EnsureInstalled() call.

Override runtime paths

The Rust, TypeScript, and Python SDKs can override the process-wide libkrunfw path directly. Call the setter before creating a local sandbox.
Environment variables work across the SDKs and take precedence over SDK-provided or configured paths: Set these process-wide overrides before creating any local sandbox. They do not belong to an individual sandbox configuration.

Inspect Go versions

Go also exposes the SDK’s pinned release version and the version reported by the loaded FFI library:
SDKVersion() string does not load the FFI library. RuntimeVersion() (string, error) loads it automatically on first use and returns an error if loading fails.