Bazel build status on BuildKite CMake build status on GitHub

Sandboxed API lockup text with sandbox visual

Copyright 2019-2026 Google LLC

Introduction

The open-source Sandboxed API (SAPI) project builds on top of Google's Sandbox2 and aims to make sandboxing of C/C++ libraries less burdensome.

Sandboxed API provides three main benefits:

Sandboxed API (SAPI) has been designed, developed, and is maintained by members of the Google Sandbox Team. It also uses our field-tested Sandbox2. Currently, many internal projects are using SAPI to isolate their production workloads.

Sandbox2 is also open-sourced as part of the SAPI project and can be used independently.

Documentation

Developer documentation is available at Sandboxed API and Sandbox2.

We recommend reading SAPI Getting Started guide, or Sandbox2 Getting Started respectively.

If you are interested in a general overview of sandboxing technologies, see https://developers.google.com/code-sandboxing.

Dependencies

SAPI and Sandbox2 both support Bazel and CMake build systems. The following dependencies are required on Debian 13 ("Trixie"):

sudo apt-get update
sudo apt-get install -qy --no-install-recommends \
      build-essential \
      clang-19 \
      git \
      gnupg \
      libcap-dev \
      libclang-19-dev \
      libclang-rt-19-dev \
      libncurses-dev \
      libzstd-dev \
      linux-libc-dev \
      llvm-19-dev \
      pkg-config \
      unzip \
      wget \
      zip \
      zlib1g-dev
# Bazel only, check https://bazel.build/install/ubuntu for details
sudo apt-get install -qy --no-install-recommends \
      bazel \
      openjdk-17-jdk-headless
# CMake only
sudo apt-get install -qy --no-install-recommends \
      cmake \
      ninja-build

LLVM

SAPI offers a clang tool header generator based on LLVM Libtooling.

We aim to provide support for at least the latest three LLVM releases and test on Debian stable.

Getting Involved

If you want to contribute, please read CONTRIBUTING.md and send us pull requests. You can also report bugs or file feature requests.

If you'd like to talk to the developers or get notified about major product updates, you may want to subscribe to our mailing list or sign up with this link.