| Crates.io | ranim |
| lib.rs | ranim |
| version | 0.1.5 |
| created_at | 2024-12-23 10:58:00.454421+00 |
| updated_at | 2025-10-18 06:36:38.285697+00 |
| description | An animation engine inspired by manim and JAnim |
| homepage | https://azurice.github.io/ranim |
| repository | https://github.com/AzurIce/ranim |
| max_upload_size | |
| id | 1492979 |
| size | 392,687 |
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.
Runtime dependencies:
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 -- --example <example-name>
See Ranim Cli for more.
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 --bin ranim
Or you can create a bin, and run cli from ranim_cli directly (this can make sure the version of ranim matches ranim_cli):
use clap::Parser;
use ranim_cli::cli::Cli;
fn main() {
// Optional
// pretty_env_logger::formatted_timed_builder()
// .filter(Some("ranim_cli"), log::LevelFilter::Info)
// .filter(Some("ranim"), log::LevelFilter::Info)
// .parse_default_env()
// .init();
Cli::parse().run().unwrap();
}
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
Default features
anims: re-export ranim-anims
items: re-export ranim-items
render: enable render api in cmd module
use render_scene or render_scene_output to render scene to output
preview: enbale preview api in cmd module
use preview_scene api to launch an preview app on a scene
https://github.com/user-attachments/assets/5bf287e2-b06f-42f8-83b6-76f3775e298e
profiling: enable profiling with https://github.com/EmbarkStudios/puffin
CPU uses 127.0.0.1:8585 and GPU uses 127.0.0.1:8586
Once the design is stablized, I may write about it.
For now, you can check out the code.