LottieFiles / dotlottie-rs
A universal, high-performance Lottie and dotLottie player built with Rust. Offers smooth rendering across platforms, low resource consumption, and extensive compatibility. Features FFI bindings for C/C++, Kotlin, Swift, and WASM for seamless integration in Android, iOS, and Web projects.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing LottieFiles/dotlottie-rs in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewdotLottie Rust dotLottie Rust **dotlottie-rs** is the cross-platform dotLottie runtime written in Rust. It is the engine powering all official dotLottie players — delivering the full dotLottie feature set (theming, state machines, multi-animation, and more) with guaranteed visual consistency across every platform. It exposes a C API (via cbindgen) for native platforms and wasm-bindgen bindings for WebAssembly, serving as the core of the dotLottie players for Web, Android, iOS, Flutter, and React Native. What is dotLottie? dotLottie is an open-source file format that aggregates one or more Lottie files and their associated resources into a single file. They are ZIP archives compressed with the Deflate compression method and carry the file extension of ".lottie". Learn more about dotLottie. Features • **Cross-platform**: single Rust codebase targeting Android, iOS, Web, Flutter, React Native, and desktop • **Guaranteed visual consistency**: powered by the ThorVG renderer across all platforms • **Theming & slots**: runtime color, scalar, text, and vector slot overrides • **State machines**: declarative interactivity engine with guards, transitions, and actions • **Multi-animation**: playback control over multiple animations within a single file • **dotLottie format**: full support for the container (ZIP-based, manifest v1 & v2, embedded assets) • **C API**: cbindgen-generated header for native integration (Android NDK, iOS, desktop) • **WASM**: wasm-bindgen bindings for WebAssembly targets Available Players dotlottie-rs is the runtime core used by all official dotLottie framework players: • dotlottie-web • dotlottie-android • dotlottie-ios • dotlottie-flutter • dotlottie-react-native Repository contents • Crates • Development • License Crates • dotlottie-rs: The core library for dotLottie native players, including the C API (feature: ) and wasm-bindgen bindings (feature: ) • examples/c_api: Example usage of the native C API Development Cross-Platform Release Builds The following instructions cover building release artifacts for Android, Apple, WASM, Linux, and native platforms using the Makefile-based build system. For Rust development, just use as usual — no special setup is needed. You will need GNU installed. Note that Apple platform targets (iOS, macOS, tvOS, visionOS) require a Mac with Xcode. To ensure that your machine has all the necessary tools installed, run the following from the root of the repo: This will configure all platforms. You can also setup individual platforms using: • - Setup Android environment (requires Android NDK) • - Setup Apple environment (requires Xcode) • - Setup WASM environment (installs wasm-pack and wasm32-unknown-unknown target) Performing builds Builds can be performed for the following groups of targets: • - All Android architectures (ARM64, x86_64, x86, ARMv7) • - All Apple platforms (macOS, iOS, tvOS, visionOS, macCatalyst) • - WebAssembly (software renderer) via wasm-bindgen • - WebAssembly with WebGL2 renderer via wasm-bindgen • - WebAssembly with WebGPU renderer via wasm-bindgen • - Native library for current platform (C API via cbindgen) • - Native library with OpenGL renderer • - Native library with WebGPU renderer • - Linux x86_64 and ARM64 For and , builds will be performed for all supported architectures, whereas for , only a single target will be built. These names refer to Makefile targets that can be used to build them. For example, to build all targets, execute the following: You can also build specific architectures: The default target shows the help menu: Native C-API The C bindings can be generated by using the following command, which will place the include and library files in : On Windows, you should use the make file: Examples for using the native interface can be found in the directory, which also contains a README with information on getting started. Other useful targets • : Run all tests with single-threaded execution • : Run Rust linter with strict settings • : Clean all build artifacts and Cargo cache • : Show all supported platforms For platform-specific cleanup: • : Clean Android artifacts • : Clean Apple artifacts • : Clean WASM artifacts • : Clean native artifacts More information can be found by using the target: Release Process Manually execute the Github Action workflow to create a release PR. This will include all changes since the last release. This repo uses changesets to determine the new release version. The knope tool can be installed locally and used to simply the creation of changeset files. The release PR should be checked for correctness and then merged. Once that is done, the Github Actions workflow will be started automatically to do the work of actually creating the new release and building & uploading the related release artifacts. Relevant Tools • For your dotLottie creation and modification needs • Tools for parsing Lottie animations License MIT © LottieFiles