Rutabaga Virtual Graphics Interface

The Rutabaga Virtual Graphics Interface (VGI) is a cross-platform abstraction for GPU and display virtualization. The virtio-gpu context type feature is used to dispatch commands between various Rust, C++, and C implementations. The diagram below does not exhaustively depict all available context types.

rutabaga diagram

Rust API

Although hosted in the crosvm repository, the Rutabaga VGI is designed to be portable across VMM implementations. The Rust API is available on crates.io.

Rutabaga C API

The following documentation shows how to build Rutabaga's C API with gfxstream enabled, which is the common use case.

Build dependencies

sudo apt install libdrm libglm-dev libstb-dev

Build AEMU base

git clone https://android.googlesource.com/platform/hardware/google/aemu
cd aemu/
cmake -DAEMU_COMMON_GEN_PKGCONFIG=ON \
       -DAEMU_COMMON_BUILD_CONFIG=gfxstream \
       -DENABLE_VKCEREAL_TESTS=OFF -B build
cmake --build build -j
sudo cmake --install build

Build gfxstream

git clone https://android.googlesource.com/platform/hardware/google/gfxstream
cd gfxstream/
meson setup -Ddefault_library=static build/
meson install -C build

Build FFI bindings to Rutabaga

cd $(crosvm_dir)/rutabaga_gfx/ffi/
make
sudo make install

Guest-side gfxstream libraries

If your VMM boots to a Linux guest, it's possible to run gfxstream with that.

git clone https://android.googlesource.com/platform/hardware/google/gfxstream
cd gfxstream/guest
meson setup build/
meson install -C build

Some headless Vulkan tests (deqp-vk, vulkaninfo) should work after that, but others may not (such as vulkan-samples).

Latest releases for potential packaging