19 releases

Uses new Rust 2024

new 0.1.5 Oct 18, 2025
0.1.4 Sep 16, 2025
0.1.3 Aug 20, 2025
0.1.0-alpha.17 Jul 11, 2025
0.0.0 Mar 12, 2025

#2930 in Procedural macros

Download history 57/week @ 2025-06-25 71/week @ 2025-07-02 125/week @ 2025-07-09 5/week @ 2025-07-23 230/week @ 2025-08-06 127/week @ 2025-08-13 196/week @ 2025-08-20 48/week @ 2025-08-27 16/week @ 2025-09-03 98/week @ 2025-09-10 67/week @ 2025-09-17 9/week @ 2025-09-24 32/week @ 2025-10-01 10/week @ 2025-10-08

212 downloads per month
Used in 2 crates (via ranim)

MIT license

22KB
542 lines

Ranim Logo

Ranim

license crates.io commit
build check
stars
hello_ranim ranim_logo

examples/hello_ranim

examples/ranim_logo

Ranim is an animation engine crate implemented in pure rust, inspired heavily by Manim and jkjkil4/JAnim.

[!WARNING] Ranim is now WIP. It only supports some basic items and animations, the apis are unstable and may change frequently, the documentation is also not complete.

Dependencies

Runtime dependencies:

  • ffmpeg: encode videos Ranim will try to use ffmpeg from system's path environment variable first, if no ffmpeg is found, ranim will automatic download ffmpeg to the current working dir.

Installation

Currently, it is experimental on crates.io:

[dependencies]
ranim = "0.1.5"

You can also use from git for the latest updates:

[dependencies]
ranim = { git = "https://github.com/azurice/ranim" }

For the usage, check out the examples folder. You can run the examples with:

cargo run -p ranim-cli --release -- preview --example <example-name> # run a preview app for the example
cargo run -p ranim-cli --release -- render --example <example-name> # render the example

See Ranim Cli for more.

Ranim Cli

Ranim cli is a command line tool to help you build the animation. It enables animation previewing with hot reload through dylib.

Please notice that you can use ranim without ranim-cli, the previewing and rendering process can be achieved by simply invoking apis provided by ranim, but it may enhance your experience.

You can install it with:

cargo install ranim-cli

Or install from git:

cargo install --git https://github.com/azurice/ranim ranim-cli --locked

Or you can create a bin, and run cli from ranim_cli directly (this can make sure the version of ranim matches ranim_cli):

fn main() {
    ranim_cli::main();
}

Basic Usage:

  • ranim preview[ <scene_name>]: Launch a preview app and invoke cargo to build your library automatically when the source code is changed, then reload it through libloading and show it in the preview app.
  • ranim render[ <scene-name1> <scene_name2> ...]: Render scene's output, when no scene name is specified, render all scenes.

You can specify the package with --package and --example (just like cargo, note that your anim target should have crate-type of dylib or cdylib), and other aditional arguments you want to pass to cargo build can be passed after --.

For example:

ranim render -p render scene_a scene_b -- --release

Feature Flags

Design

Once the design is stablized, I may write about it.

For now, you can check out the code.

Aknowledgements

Star History

Star History Chart

Dependencies

~3MB
~70K SLoC