Rive Native vs Rive
Rive Native (rive_native) is a Flutter plugin that integrates the Rive Renderer and the core Rive C++ runtime.
The Rive Flutter runtime (rive) is built on top of rive_native. We recommend including the rive package as a dependency, as that will automatically include rive_native, while also providing a user-friendly API for working with Rive assets in Flutter.
Rive Native replaces the Rive Common
(
rive_common) plugin that Rive Flutter previously used for native
operations.Understanding Rive Native
Rive Native acts as the bridge between Flutter and the Rive C++ runtime, allowing you to use Rive graphics in your Flutter applications.-
C++ Runtime Integration:
rive_nativeis built on Rive’s C++ runtime via FFI. This ensures a consistent experience across platforms and the Rive Editor, while unlocking performance improvements and new features exclusive to the C++ runtime, such as: -
Rive Renderer Support:
rive_nativebring the Rive Renderer to Flutter. While you can still use the Flutter-based renderer (Dart/Impeller), the Rive Renderer is recommended for performance-critical use cases. For more information see Choosing a Renderer. Some features, like Vector Feathering, are only supported with the Rive Renderer. See the Feature Support page for more details.
Getting Started
rive_native is not yet publicly available on GitHub but will be soon. For now, you can pull the source code and example by running:
rive_player.dart file in rive_native/example/rive_player.dart.
Platform Support
Prebuilt Linux libraries do not yet include arm64. On Linux arm64, build
rive_native manually.Feature Support
See the Feature Support page for details.Troubleshooting
The required native libraries should be automatically downloaded during the build step (flutter run or flutter build). If you encounter issues, try the following:
- Run
flutter clean - Run
flutter pub get - Run
flutter run
rive_native setup script. In the root of your Flutter app, execute:
rive_native setup and download the platform-specific libraries specified with the --platform flag. Refer to the Platform Support section above for details.
Android
If you’re running into automated setup issues (example issues 555 and 515), you can skip setup by settingrive.native.skipSetup=true in your app’s gradle.properties.
When enabled, you must manually run dart run rive_native:setup --verbose --clean --platform android to download the required libraries.
Building rive_native
By default, prebuilt native libraries are downloaded and used. You can build them from source instead: the published rive_native package includes the full C++ source (native/ and runtime/), and the setup script compiles it in place in the Pub cache.
Check the build requirements for your platform, then run the following in the root of your Flutter app:
--platform accepts android, ios, macos, windows, and linux, or a comma-separated list (for example, android,macos). Each platform except Android must be built on the operating system it targets; Android builds on any host and produces all four ABIs (armeabi-v7a, arm64-v8a, x86, x86_64). For web, see Web below.
A successful build leaves a rive_marker_<platform>_development file in the package, so subsequent flutter run and flutter build calls use your locally built libraries instead of downloading prebuilts. Without --clean, setup does nothing once this marker exists.
Build Requirements
All platforms:- Network access and
git: the first build clones the build system and third-party sources (HarfBuzz, Yoga, zlib, and others) from public GitHub repositories into the package’snative/dependencies/folder - no credentials required. bash, GNUmake, andpython3: used by the build scripts and shader generation.
- macOS / iOS: Xcode
- Android: Android NDK r27c (
27.2.12479018) - the exact version is enforced; pointNDK_PATHorANDROID_NDKat it - andninja. - Windows: Visual Studio 2022 (Desktop development with C++ workload) with
msbuild.exeonPATH(for example, run from a Visual Studio developer prompt), Git Bash, andmake(choco install make). - Linux:
clang,cmake,ninja-build,pkg-config,libgtk-3-dev,uuid-dev,libstdc++-12-dev, andlibvulkan-dev(apt package names).
Returning to Prebuilt Libraries
Run the setup script without--build - --clean removes the built libraries and marker files, and prebuilts are downloaded again:
dart pub cache repair and dart pub cache clean also remove them. They are restored on the next flutter run, or by re-running the setup script.
Web
The setup script does not manage web binaries. On web,rive_native loads its WebAssembly module at runtime from Rive’s CDN (jsDelivr, pinned to the version matching the package).
To self-host these files instead, copy the wasm/ and wasm_compatibility/ folders from the @rive-app/flutter-native-wasm NPM package to your server, then build with:
wasm/rive_native.js or wasm_compatibility/rive_native.js to the host URL.
Testing
Shared libraries are included in the download/build process. If you encounter issues usingrive_native in your tests, please reach out to us for assistance.