rive-runtime: The C++ Core Behind Every Rive Platform SDK
Low-level C++ Rive runtime and renderer. Windows: Visual Studio 2022 with the C++ Clang Compiler for Windows and MSBuild support for LLVM (clang-cl) toolset individual components.
At a glance
- What is it?
- rive-runtime is the lowest-level Rive library, written in C++. It loads .riv files, drives state machines, and renders vector graphics through an abstract interface that plugs into Metal, Vulkan, D3D11, D3D12, and OpenGL/WebGL. Every higher-level Rive SDK for Apple, Android, Flutter, Unity, Unreal, and the web wraps this library.
- Who is it for?
- rive-runtime is the right choice when you are building a custom Rive integration for a platform, game engine, or embedded environment that the official higher-level SDKs do not cover, or when you need to inspect or extend the rendering layer directly. Engineers who can use an existing Rive SDK for Flutter, iOS, Android, Unity, or Unreal should do so: those wrappers handle the boilerplate that rive-runtime leaves to the integrator.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 6 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What rive-runtime Does and Its Place in the Rive Ecosystem
rive-runtime is the foundational layer of the entire Rive platform. Its job is narrow and well-defined: take a .riv file produced by the Rive editor, load its artboards and their contents, advance animations and state machines by a given time delta, and draw the result through an abstract Renderer interface. Everything else in the Rive ecosystem, including the Apple SDK, the Android SDK, the Flutter plugin, the Unity package, and the web runtime, is built on top of this C++ library.
The intended audience is platform integrators rather than end users of Rive animations. If you are embedding Rive into a custom game engine, a native desktop application, or an embedded device where the official SDKs do not apply, rive-runtime is the layer to target. Engineers working within a supported platform can and should use the higher-level SDK for that platform instead: those SDKs handle the platform-specific setup that rive-runtime leaves to the caller.
The library lives in the rive-app/rive-runtime repository on GitHub and is released under the MIT license. As of the last repository push on 2026-09-25, the project is under active development with no GitHub releases tagged, meaning integrators build from the main branch rather than pinned release artifacts.
The Renderer Architecture: Abstract Interface and GPU Backends
The design separates animation logic from rendering through a Renderer abstract interface. The core runtime advances artboard state and emits drawing commands through that interface; it does not know or care whether those commands end up on screen via Metal, Vulkan, or any other graphics API. This decoupling is intentional: it allows rive-runtime to serve as the animation engine across radically different rendering stacks without changes to the core code.
For integrators who want a full GPU renderer out of the box, the repository includes RiveRenderer, a state-of-the-art vector renderer with RenderContextImpl backends for five graphics APIs: Metal, Vulkan, D3D11, D3D12, and OpenGL/WebGL. The correct backend is selected at build time based on the target platform. On macOS and iOS, the Metal backend is used. On Windows, D3D11 or D3D12 is available. Vulkan covers Linux and cross-platform scenarios where the Vulkan SDK is present.
For integrators with an existing rendering pipeline, the abstract Renderer interface is the hook point. Supplying a custom implementation that translates Rive drawing commands into the host engine's own draw calls is the documented path for custom integrations. The README does not describe the Renderer interface methods in detail, but the include/ directory contains the relevant header files.
Building rive-runtime: Prerequisites and the Build Script
The build system relies on premake5, a Lua-based project file generator. A build helper script handles the premake5 download on first run, selects the right build system for the host (gmake2 on macOS and Linux, MSBuild on Windows), and dispatches the build. The script must be run from a directory that contains a premake5.lua file; the tests/ directory is the standard starting point and builds the core library, the GPU renderer, and a sample player application.
Prerequisites differ by platform. On macOS, clang from the Xcode Command Line Tools is sufficient. On Linux, install clang from the distribution package manager. On Windows, Visual Studio 2022 with two specific individual components is required: C++ Clang Compiler for Windows and MSBuild support for LLVM (clang-cl) toolset.
To clone and build on macOS or Linux:
git clone https://github.com/rive-app/rive-runtime.git
cd rive-runtime/tests
../build/build_rive.sh releaseThe build helper accepts flags to control the output. A debug build with no arguments, a release build with the clean flag, iOS cross-compilation, Android cross-compilation, and WebAssembly are all documented in the README as command variants:
../build/build_rive.sh release clean
../build/build_rive.sh ios release
../build/build_rive.sh android release
../build/build_rive.sh ninja release wasmBuild artifacts land in out/<config>/ relative to the directory from which the build was run. A host release build produces out/release/. A cross-compiled iOS build produces out/ios_release/. The primary output is librive.a (or rive.lib on Windows) for the core runtime, and librive_pls_renderer.a (or rive_pls_renderer.lib) for the GPU renderer. The player sample application is also built and can load and render a .riv file directly.
How State Machines and Artboards Work at the C++ Level
A .riv file contains one or more artboards. Each artboard has a hierarchy of objects and may have one or more state machines that control animations through transitions between states. At the C++ level, the workflow is to open the file, load an artboard, query its state machines by name, configure inputs to the state machine, call Artboard::advance with a time delta on each frame, and then call render with a Renderer instance.
The artboard hierarchy is mutable. The README describes the same mutation mechanism that state machines use as available to integrators directly, meaning custom code can move, scale, or modify artboard objects between advance calls using the same API the state machine engine uses internally. The advance call solves those changes efficiently, recomputing only what changed.
Oversized tool results and payloads are a concern in any runtime that processes external files. The README does not document explicit size limits on .riv files, but the Dockerfile used for the thumbnail generator pipeline gives indirect evidence of how the runtime is used in production: it loads .riv files through the standard library path and renders thumbnails in a headless Linux environment.
Testing Approach: Golden Images and Unit Tests
The primary form of testing in rive-runtime is golden testing, a method that renders known scenes and diffs the result against checked-in reference images. The goldens and gms test harness binaries are built into out/<config>/goldens and out/<config>/gms during the standard build. This approach makes visual regressions visible in CI without requiring a running application.
Unit tests are secondary and use the Catch2 framework. They live in two directories: tests/unit_tests/runtime/ for the core runtime and tests/unit_tests/renderer/ for the renderer. Running all unit tests is one command from the repository root:
cd tests/unit_tests
./test.shOn macOS, the test suite can be run under the built-in leaks tool to check for memory issues:
cd tests/unit_tests
./test.sh memoryThe memory flag is silently ignored on Linux and Windows. New unit tests are added by creating an xxx_test.cpp file in the appropriate directory; the test harness discovers them automatically without requiring any registration step.
Code style is enforced with clang-format. On macOS, Homebrew provides it. On Windows, it ships with the VS 2022 C++ Clang Compiler component at a known path under the Visual Studio installation directory.
Limitations and When rive-runtime Is the Wrong Choice
rive-runtime is a C++ library with a native build system. Integrators who want to use Rive in a managed language environment (Swift, Kotlin, Dart, C#) are better served by the official Rive SDKs for those platforms, which wrap this library and expose idiomatic APIs. Using rive-runtime directly from those environments would require writing and maintaining a foreign-function interface layer.
The Windows build requires a specific toolchain configuration: Visual Studio 2022 with two individual components installed explicitly. A default VS 2022 installation does not include them. Engineers who already have a different C++ compiler setup on Windows will need to adjust before building. The README documents the --toolset=msc flag for switching to MSVC's cl.exe, but clang-cl is the default.
The repository has no tagged GitHub releases. Integrators must pin to a commit hash rather than a semantic version if they want reproducible builds. The .rive_head file in the repository root likely tracks the pinned upstream state, but the README does not document a stable release cadence or a compatibility guarantee across commits.
The closest alternative for teams that want Rive animations in a web context without building from C++ is the Rive web runtime, which is a JavaScript library that compiles this C++ core to WebAssembly. For custom game engines where a C++ integration is necessary, the abstract Renderer interface means that the core library can be embedded without adopting any of the five built-in GPU backends.
Maintenance, Licensing, and the Dockerfile
The repository is MIT-licensed, which places no restrictions on commercial use, sublicensing, or distribution, provided the license text is included. This is a permissive choice appropriate for a low-level library intended to be embedded in third-party products.
The repository includes a Dockerfile that builds a thumbnail generator service against the Skia backend. That Dockerfile installs premake5 from a pinned GitHub release, sets the CC and CXX environment variables to the system clang, and builds Skia and GLFW before compiling the main library. This is the deployment path used internally by Rive and demonstrates that rive-runtime is production-used in a headless server context, not only on client devices.
The last push to the main branch was on 2026-09-25, three days before the date of this review. The project shows consistent recent activity.
Editorial conclusion
rive-runtime is the right choice when you are building a custom Rive integration for a platform, game engine, or embedded environment that the official higher-level SDKs do not cover, or when you need to inspect or extend the rendering layer directly. Engineers who can use an existing Rive SDK for Flutter, iOS, Android, Unity, or Unreal should do so: those wrappers handle the boilerplate that rive-runtime leaves to the integrator. Before building, verify that your platform is covered by the GPU renderer backends or plan to supply a custom Renderer implementation. The library requires C++17 and clang as of the current release; MSVC is supported on Windows through the --toolset=msc flag but is not the default.
Frequently asked questions
What is rive runtime?
rive-runtime is the C++ library that powers all Rive platform SDKs. It loads .riv animation files, advances state machines, and renders vector graphics through a pluggable Renderer interface with backends for Metal, Vulkan, D3D11, D3D12, and OpenGL/WebGL.
How do I open a .riv file?
A .riv file is the binary format produced by the Rive editor. Opening one programmatically requires a Rive runtime library. rive-runtime provides the lowest-level C++ API for loading artboards and state machines from .riv files; the official higher-level SDKs for Flutter, iOS, Android, web, and Unity wrap the same library with platform-specific APIs.
Does rive-runtime require a specific graphics API, or can it work with a custom renderer?
The library ships with a GPU renderer covering Metal, Vulkan, D3D11, D3D12, and OpenGL/WebGL, but the core runtime operates through an abstract Renderer interface. An integrator can supply a custom implementation to translate Rive draw commands into any graphics API not covered by the built-in backends.