ranim 0.2.0

An animation engine inspired by manim and JAnim
Documentation
[package]
name = "ranim"
description = "An animation engine inspired by manim and JAnim"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage = "https://azurice.github.io/ranim"
readme = "README.md"
keywords = ["animation", "manim", "wgpu"]
exclude = ["website", "assets", "book"]

[lib]
crate-type = ["rlib", "cdylib"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace]
members = ["benches", "example-packages/*", "packages/*", "xtasks/*"]

[workspace.package]
version = "0.2.0"
edition = "2024"
license = "MIT"
repository = "https://github.com/AzurIce/ranim"

[workspace.dependencies]
ranim = { path = ".", version = "0.2.0", default-features = false }
ranim-core = { path = "packages/ranim-core", version = "0.2.0" }
ranim-items = { path = "packages/ranim-items", version = "0.2.0" }
ranim-anims = { path = "packages/ranim-anims", version = "0.2.0" }
ranim-macros = { path = "packages/ranim-macros", version = "0.2.0" }
ranim-render = { path = "packages/ranim-render", version = "0.2.0" }
wgpu-profiler = { version = "0.27.0", features = ["puffin"] }
wasm-bindgen = "0.2.117"
glam = "0.30.10"
tracing = "0.1.44"
tracing-indicatif = "0.3.14"
tracing-subscriber = "0.3.23"
itertools = "0.14.0"
bytemuck = "1.25.0"
wgpu = "29.0.1"
image = "0.25.10"
derive_more = "2.1.1"

[features]
# default = ["output"]
default = ["anims", "items"]
anims = []
items = []
profiling = [
  "ranim-render/profiling",
  "dep:puffin",
  "dep:puffin_http",
  "dep:profiling",
]
# output = ["dep:async-channel"]
render = [
  "dep:ranim-render",
  "dep:wgpu",
  "dep:pollster",
  "dep:which",
  "dep:indicatif",
  "dep:tracing-indicatif",
  "dep:flate2",
  "dep:reqwest",
]
preview = [
  "render",
  "dep:egui",
  "dep:eframe",
  "dep:egui-phosphor",
  "dep:web-time",
  "dep:bytemuck",
  "dep:wasm-bindgen-futures",
  "dep:web-sys",
  "dep:console_error_panic_hook",
  "dep:wasm-tracing",
]
# serde = ["dep:serde", "glam/serde"]

[dependencies]
ranim-core.workspace = true
ranim-items.workspace = true
ranim-anims.workspace = true
ranim-macros.workspace = true
itertools.workspace = true
tracing.workspace = true
derive_more = { workspace = true, features = [
  "deref_mut",
  "deref",
  "index",
  "index_mut",
  "is_variant",
  "as_ref",
  "from",
  "into_iterator",
] }
anyhow = "1.0.102"
ranim-render = { workspace = true, optional = true }
# render feature (wasm-compatible deps here, rest in target-specific section below)
wgpu = { workspace = true, optional = true }
# app feature
egui = { version = "0.34.1", optional = true }
egui-phosphor = { version = "0.12.0", optional = true }
web-time = { version = "1.1.0", optional = true }
bytemuck = { workspace = true, features = ["derive"], optional = true }
# profiling
puffin = { version = "0.19.1", optional = true }
puffin_http = { version = "0.16.1", optional = true }
profiling = { version = "1.0.17", optional = true, features = [
  "profile-with-puffin",
] }
async-channel = "2.5.0"
inventory = "0.3.24"

[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen.workspace = true
# app feature (wasm)
eframe = { version = "0.34.1", default-features = false, features = [
    "accesskit",
    "default_fonts",
    "web_screen_reader",
    "wgpu",
], optional = true }
wasm-bindgen-futures = { version = "0.4.67", optional = true }
web-sys = { version = "0.3.94", optional = true }
console_error_panic_hook = { version = "0.1.7", optional = true }
wasm-tracing = { version = "2.1.0", optional = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
# render deps (wasm-incompatible, only used in cfg(not(wasm)) code)
pollster = { version = "0.4.0", optional = true }
which = { version = "8.0.2", optional = true }
indicatif = { version = "0.18.4", optional = true }
tracing-indicatif = { workspace = true, optional = true }
flate2 = { version = "1.1.9", optional = true }
reqwest = { version = "0.13.2", features = ["blocking"], optional = true }
# app feature (native)
eframe = { version = "0.34.1", features = ["wgpu"], optional = true }

[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
pretty_env_logger = "0.5.0"

[dev-dependencies]
assert_float_eq = "1.2.0"
rand = "0.9.2"
rand_chacha = "0.9.0"
getrandom = { version = "0.3.4", features = ["wasm_js"] }

# Enable a small amount of optimization in the dev profile.
[profile.dev]
opt-level = 1

# Enable a large amount of optimization in the dev profile for dependencies.
[profile.dev.package."*"]
opt-level = 3

[package.metadata.release]
pre-release-hook = [
  "git",
  "cliff",
  "-o",
  "CHANGELOG.md",
  "--tag",
  "{{version}}",
]
pre-release-replacements = [
  { file = "README.md", search = "ranim = \"[^\"]+\"", replace = "{{crate_name}} = \"{{version}}\"" },
]

# MARK: Examples
[[example]]
name = "aabb"
path = "examples/aabb/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.aabb]
wasm = true

[[example]]
name = "animating_pi"
path = "examples/animating_pi/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.animating_pi]
wasm = true

[[example]]
name = "arc"
path = "examples/arc/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.arc]
wasm = true

[[example]]
name = "arc_between_points"
path = "examples/arc_between_points/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.arc_between_points]
wasm = true

[[example]]
name = "basic"
path = "examples/basic/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.basic]
wasm = true

[[example]]
name = "hanoi"
path = "examples/hanoi/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.hanoi]
wasm = true

[[example]]
name = "hello_ranim"
path = "examples/hello_ranim/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.hello_ranim]
wasm = true

[[example]]
name = "palettes"
path = "examples/palettes/lib.rs"
crate-type = ["cdylib"]

[[example]]
name = "perspective_blend"
path = "examples/perspective_blend/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.perspective_blend]
wasm = true

[[example]]
name = "ranim_logo"
path = "examples/ranim_logo/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.ranim_logo]
wasm = true

[[example]]
name = "extract_vitem_visualize"
path = "examples/extract_vitem_visualize/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.extract_vitem_visualize]
wasm = true

[[example]]
name = "test"
path = "examples/test/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.test]
hide = true
wasm = false

[[example]]
name = "bubble_sort"
path = "examples/bubble_sort/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.bubble_sort]
wasm = true

[[example]]
name = "getting_started0"
path = "examples/getting_started0/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.getting_started0]
wasm = true
hide = true

[[example]]
name = "getting_started1"
path = "examples/getting_started1/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.getting_started1]
wasm = true
hide = true

[[example]]
name = "getting_started2"
path = "examples/getting_started2/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.getting_started2]
wasm = true
hide = true

[[example]]
name = "selective_sort"
path = "examples/selective_sort/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.selective_sort]
wasm = true

[[example]]
name = "regular_polygon"
path = "examples/regular_polygon/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.regular_polygon]
wasm = true

[[example]]
name = "ellipse"
path = "examples/ellipse/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.ellipse]
wasm = true

[[example]]
name = "output_formats"
path = "examples/output_formats/lib.rs"
crate-type = ["cdylib"]

[[example]]
name = "text_item"
path = "examples/text_item/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.text_item]
wasm = true

[[example]]
name = "perlin_terrain"
path = "examples/perlin_terrain/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.perlin_terrain]
wasm = true

[[example]]
name = "mesh_morph"
path = "examples/mesh_morph/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.mesh_morph]
wasm = true

[[example]]
name = "tetrahedron_spheres"
path = "examples/tetrahedron_spheres/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.tetrahedron_spheres]
wasm = true

[[example]]
name = "solar_system"
path = "examples/solar_system/lib.rs"
crate-type = ["cdylib"]

[package.metadata.example.solar_system]
wasm = true