Giter Site home page Giter Site logo

rlottie-rs's Introduction

rlottie-rs

Rust bindings to rlottie and some additional Rust code that interfaces with lottie files.

This repository contains the following crates:

Deprecated crates:

  • lottie2gif lottie2gif main branch docs lottie2gif release docs lottie2gif on crates.io
  • lottie2webp lottie2webp main branch docs lottie2webp release docs lottie2webp on crates.io

rlottie-rs's People

Contributors

dependabot[bot] avatar luckyturtledev avatar msrd0 avatar yuraiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rlottie-rs's Issues

Any plans to use gifski instead of gif crates?

Thanks for creating this great project. Is there a plan to replace gif crates with gifski in this project? As far as I know, gifski generates better quality GIF files.

Then I don't know if there is a performance difference between the two.

Examples?

Thanks for sharing your work!

It would be cool if you could include an example on how to use those bindings on the Rust ecosystem -- maybe on Yew or Egui?

An Egui example would be particularly cool, as it may be used to create UIs for Desktop, Web, Android, iOS...

Render to arbitary size surface.

lottie is a vector image format and it can be render to arbitary size surface losslessly. But Animation::render() requires a Size struct which can't be constructed. Only Animation::size() can return a Size struct.

What about add a constructor function to Size struct?

Support conversion to videos

Support for converting to video will be very useful, as it is smaller than GIF files and can take advantage of GPU hardware acceleration when playing.

There is a SkottieTool in Skottie that generates mp4 files from FFmpeg, I don't know if this is something I could learn from.

If you plan to support video, I can port this library to Node.js via napi-rs.

Compatibility with rustup's musl toolchain

Currently, rlottie-sys will always load libclang.so at build time which is unsupported by rustup's static musl toolchain. To fix this, we need to detect a static-only toolchain and disable the runtime feature of clang/bindgen.

However, this is not currently supported by cargo: rust-lang/cargo#1197

See also #17

Windows support

Currently, this project relies on the rlottie C library to be precompiled and pkg-config to be able to find it. This seems to be incompatible with windows.

I see two options going forward:

  • Somehow detect precompiled versions of rlottie on Windows. No idea if that's possible, and which tools are necessary to do this.
  • Add a vendor feature similar to other -sys crates in the ecosystem that downloads and compiles a version of rlottie and statically links it.

These options are not incompatible with each other, so both could be implemented if desired. As I don't have windows, I cannot implement this myself, but PRs are welcome. Any implementing PR needs to have a CI setup that tests everything on windows as I won't be able to test locally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.