Skip to content

Commit cfee996

Browse files
authored
feat(lottie): native Lottie decoding via vendored ThorVG (#65)
Closes #52. Default-on lottie-native feature over the thorvg crate: proven byte order, thread_local engine, bounded frame cache, graceful failures, frames_dir priority preserved.
1 parent d5365f5 commit cfee996

4 files changed

Lines changed: 561 additions & 19 deletions

File tree

Cargo.lock

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/rustmotion-components/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ description = "Component library for rustmotion (51 components)"
66
license = "MIT"
77
repository = "https://github.com/LeadcodeDev/rustmotion"
88

9+
[features]
10+
default = ["lottie-native"]
11+
## Native Lottie decoding via the thorvg CPU rasterizer.
12+
## Enabled by default. Disable with `--no-default-features` to drop the thorvg
13+
## dependency and fall back to the pre-rendered frames_dir path only.
14+
lottie-native = ["dep:thorvg", "dep:dashmap"]
15+
916
[dependencies]
1017
rustmotion-core = { path = "../rustmotion-core", version = "0.6.0" }
1118
skia-safe = "0.82"
@@ -20,3 +27,5 @@ qrcode = "0.14"
2027
gif = "0.13"
2128
syntect = { version = "5", default-features = false, features = ["default-fancy"] }
2229
similar = "2"
30+
thorvg = { version = "0.5", optional = true }
31+
dashmap = { version = "6", optional = true }

0 commit comments

Comments
 (0)