Install the build prerequisites
Set up Rust, a C++ toolchain, and your platform SDK before compiling the dotLottie native runtime, and clone the repository with its ThorVG submodule.
The native runtime is compiled from source, so you need a working Rust toolchain and a C++ compiler before you can build anything. The renderer, ThorVG, is vendored as a Git submodule and compiled from source by the build script — that is why a C++ compiler is required even though the runtime itself is Rust.
Common requirements
Every platform needs all of the following.
| Requirement | Minimum version | Why it's needed |
| Rust | 1.85 | Builds the runtime. Install with rustup↗ |
| A C++ compiler | clang or MSVC | Compiles the vendored ThorVG renderer |
| libclang | any recent | bindgen reads ThorVG's C headers with it |
| GNU Make | any recent | Runs the per-architecture build targets |
| Git | any recent | Fetches the ThorVG submodule |
Clone with submodules
ThorVG lives in a submodule, and the build fails without it. Clone recursively:
git clone --recurse-submodules https://github.com/LottieFiles/dotlottie-rs.git
cd dotlottie-rsIf you already cloned the repository without submodules, fetch them now:
git submodule update --init --recursiveWithout dotlottie-rs/deps/thorvg, the build script fails while trying to compile renderer sources or run bindgen,
which reads as a C++ toolchain problem rather than a missing checkout. Verify the submodule first with git submodule
status — it should print a commit hash for dotlottie-rs/deps/thorvg.
Platform toolchains
Install the toolchain for each platform you intend to target.
To build for the machine you are sitting at, the common requirements are enough. On Debian and Ubuntu:
sudo apt-get install build-essential clang libclang-dev make gitOn macOS, install the Xcode command line tools:
xcode-select --installConfirm your setup
Check that the toolchain resolves and the submodule is present:
rustc --version # must report 1.85.0 or newer
git submodule status # must list dotlottie-rs/deps/thorvg
make list-platforms # prints the platforms this checkout can buildNext steps
Build for your target architecture — compile the library and generate the C header
Link the runtime into your project — once you have build output