Native Player

Compile the dotLottie runtime for your target architecture and play Lottie animations from C or C++, with guides for rendering, theming, and events.

The native runtime exposes dotlottie-rs as a plain C library. It ships as source rather than as a prebuilt package, so the first step is always to compile it for the architectures you target and generate the dotlottie_player.h header that describes the API.

Everything the Android, iOS, Flutter, and React Native players can do is available here: loading .lottie and Lottie JSON files, playback control, software and GPU render targets, theming, slots, and interactive state machines.

New to the runtime? Work through the tutorials in order — each one depends on the previous. Already building? Jump to the guides or the reference.

Prerequisites

Install the Rust, C++, and platform toolchains the build needs.

Build for your architecture

Compile the library and generate the C header for Android, Apple, Linux, or Windows.

Link into your project

Wire the header and library into a Makefile, CMake project, or Xcode target.

Render your first animation

A complete C program that loads an animation and renders it to a pixel buffer.

How the C API works

The handle model, error results, ownership rules, and feature gating.

State Machines

Drive interactive animations with inputs, pointer events, and transitions.

Memory and safety

Ownership rules, destruction order, string lifetimes, and thread safety.

C API reference

Every function, enum, and struct in dotlottie_player.h.

Last updated: September 11, 2026 at 12:08 PMEdit this page