• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 1 year ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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 Kotlin, Swift, and WASM for seamless integration in Android, iOS, and Web projects.

dotLottie Rust

CI GitHub contributors GitHub

dotLottie Rust

This is the Rust implementation of the dotLottie player and its related tools. It utilizes uniffi-rs to generate FFI bindings for Kotlin, Swift, and WebAssembly (WASM). these bindings are then used in the native dotLottie players for Android, iOS, and Web bringing consistency of playback and dotLottie features across all platforms.

flowchart TD
  A[dotLottie-web] --> WASM+Bindings[WASM Bindings]
  B[dotLottie-ios] --> swift+Bindings[Swift Bindings]
  C[dotLottie-android] --> kotlin+Bindings[Kotlin Bindings]

  WASM+Bindings --> dotLottie-ffi[dotLottie-ffi \n 'uniffi bindings']
  swift+Bindings --> dotLottie-ffi[dotLottie-ffi \n 'uniffi bindings']
  kotlin+Bindings --> dotLottie-ffi[dotLottie-ffi \n 'uniffi bindings']

  dotLottie-ffi --> dotlottiers[dotLottie-rs \n 'Core player']

  dotlottiers --> Thorvg[Thorvg \n 'Lottie renderer']
  dotlottiers --> dotlotttie-fms[dotLottie-fms \n'File manager']

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

dotLottie-rs builds on the Lottie format, adding powerful quality of life improvements and new features:

  • Theming support
  • Multi-animation support
  • Built-in interactivity powered by state machines (in development)
  • Reduced animation file sizes
  • Feature parity across platforms
  • Guarenteed visual consistancy across platforms (Thanks to the Thorvg renderer)

Available Players

dotLottie-rs serves as a core player from which our framework players use:

Repository contents

Crates

  • dotlottie-rs: The core library for dotLottie native players
  • dotlottie-fms: The dotLottie file management system library
  • dotlottie-ffi: The FFI bindings for dotLottie core player to kotlin, swift and wasm
  • demo-player: A demo player for dotLottie written in Rust

Development

Build Instructions

To build for all target platforms, it would be best to use a Mac. You will also need GNU make installed, at a bare minimum. To ensure that your local machine has all the other necessary tools installed to build the project, run the following from the root of the repo:

make mac-setup

Performing builds

Builds can be performed for the following groups of targets:

  • android
  • apple
  • WASM

For android and apple, builds will be performed for all supported architectures, whereas for WASM, 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 android targets, execute the following:

make android

To build all targets, execute the following:

make all

Other useful targets

  • demo-player: Build the demo player
  • clean: Cleanup rust build artifacts
  • distclean: Cleanup ALL build artifacts

More information can be found by using the help target:

make help

Release Process

Manually execute the Create Release PR 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 Release 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

License

MIT Β© LottieFiles

More Repositories

1

lottie-player

Lottie viewer/player as an easy to use web component! https://lottiefiles.com/web-player
TypeScript
1,539
star
2

lottie-react

lottie web player as a react component
TypeScript
718
star
3

lottie-interactivity

A small javascript library to enable interactivity with Lottie animations
HTML
428
star
4

awesome-lottie

A curated list of bookmarks, libraries, tools and resources related to Lottie and Bodymovin
306
star
5

jlottie

A small-footprint lottie player in Javascript
CSS
182
star
6

dotlottie-web

Official LottieFiles player for rendering Lottie and dotLottie animations in the web. Supports React, Vue, Svelte, SolidJS and Web Components.
TypeScript
155
star
7

lottie-js

An object model for representing and manipulating the Lottie JSON structure in JS.
TypeScript
143
star
8

svelte-lottie-player

Lottie Player component for Svelte
HTML
136
star
9

glottie

OpenGL/WebGL based Lottie animation player
C++
117
star
10

lottie-vue

Lottie player wrapper for Vue.js
Vue
112
star
11

tgskit

Toolkit for dealing with Telegram Stickers and Bodymovin/Lottie animations.
TypeScript
62
star
12

relottie

Lottie processor powered by plugins
TypeScript
45
star
13

lottie-docs

Documentation for the lottie file format
Python
45
star
14

dotlottie-ios

.lottie player for iOS
C
41
star
15

dotlottie-android

Kotlin
37
star
16

svg-to-lottie-converter

SVG to Lottie API
Python
25
star
17

demo-audio-visualisation

Demonstration code for visualising audio with Lottie
C#
14
star
18

Course-for-Developers

In this quick course, you will learn the basics about implementing Lottie animations across your web and mobile apps.
10
star
19

lottie-theming

JavaScript
10
star
20

dotlottie-cs

C#
8
star
21

plugin-strapi

TypeScript
4
star
22

LottieNB

Simple insertion of Lottie player into Jupyter Notebooks
Jupyter Notebook
4
star
23

labs-epub3

Testing lottie support in an epub3 document
Shell
4
star
24

test-files

A collection of basic lotties to test lottie tooling
Python
3
star
25

lottie-styler

TypeScript
3
star
26

app-tutorial-lottieinteractions

A tutorial for Lottie Interactions
Swift
2
star
27

dotlottie-react-native

Kotlin
2
star
28

gltf-color

TypeScript
1
star