Skip to main content
This guide walks you through building BoxLite from source on macOS (Apple Silicon) and Linux (x86_64 / ARM64).

Prerequisites

  • Rust 1.75+ (stable toolchain)
  • macOS (Apple Silicon) or Linux (x86_64/ARM64) with KVM
  • Python 3.10+ (for Python SDK development)
  • Node.js 18+ (for Node.js SDK development)

Quick Start

1

Clone the repository

2

Initialize submodules

3

Install platform dependencies

4

Build the Python SDK for local development

5

Verify your build

Confirm the SDK installed correctly:
You should see a version string confirming the SDK installed correctly.

Makefile Targets

BoxLite uses a Makefile to orchestrate all builds. Below is a complete reference of available targets.

Platform Support

macOS builds use Apple’s native Hypervisor.framework. Only Apple Silicon (ARM64) is supported. Intel Macs are not supported.The platform setup script is located at scripts/setup/macos.sh.

Build Scripts

Build scripts are located in the scripts/ directory:

Building Individual Components

1

Build the guest binary

The guest binary is cross-compiled as a static musl binary:
This runs scripts/build/guest.sh under the hood.
2

Build the shim binary

The shim is the host-side process that manages the VM:
This runs scripts/build/shim.sh.
3

Build the complete runtime

Build all components together:
This runs scripts/build/build-runtime.sh, which builds the guest, shim, and runtime library.

Building Python Wheels

To build distributable Python wheels (for publishing or CI):
For local development (editable install):

Building the Node.js Package

To build the Node.js package for publishing:
For local development:

Cleaning Build Artifacts

This removes all compiled binaries, intermediate build files, and generated artifacts.

Debugging Build Issues

If you encounter build failures, enable debug logging to get more detail:

Common Issues

BoxLite requires Rust 1.75 or newer. Check your version with:
Update with:
Verify KVM is accessible:
If the device does not exist, enable hardware virtualization in your BIOS/UEFI settings. If it exists but is not accessible, check permissions:
Log out and back in for the group change to take effect.
BoxLite requires macOS 12 (Monterey) or later for Hypervisor.framework support. Check your version:
If submodules fail to initialize, try a clean clone: