[package] name = "avian2d" version = "0.1.2" edition = "2021" license = "MIT OR Apache-2.0" authors = ["Joona Aalto "] description = "An ECS-driven physics engine for the Bevy game engine" documentation = "https://docs.rs/avian2d" repository = "https://github.com/Jondolf/avian" readme = "README.md" keywords = ["gamedev", "physics", "simulation", "bevy"] categories = ["game-development", "science", "simulation"] [features] default = ["2d", "f32", "parry-f32", "debug-plugin", "parallel", "bevy_scene"] 2d = [] f32 = [] f64 = [] debug-plugin = ["bevy/bevy_gizmos", "bevy/bevy_render"] simd = ["parry2d?/simd-stable", "parry2d-f64?/simd-stable"] parallel = ["parry2d?/parallel", "parry2d-f64?/parallel"] enhanced-determinism = [ "dep:libm", "parry2d?/enhanced-determinism", "parry2d-f64?/enhanced-determinism", "bevy_math/libm", ] default-collider = ["dep:nalgebra"] # We unfortunately can't reuse the f32 and f64 features for this, # because Parry uses separate crates for f32 and f64. parry-f32 = ["f32", "dep:parry2d", "default-collider"] parry-f64 = ["f64", "dep:parry2d-f64", "default-collider"] bevy_scene = ["bevy/bevy_scene"] serialize = [ "dep:serde", "bevy/serialize", "parry2d?/serde-serialize", "parry2d-f64?/serde-serialize", ] [lib] name = "avian2d" path = "src/lib.rs" required-features = ["2d"] bench = false [dependencies] avian_derive = { path = "../avian_derive", version = "0.1" } bevy = { version = "0.14", default-features = false } bevy_math = { version = "0.14" } libm = { version = "0.2", optional = true } parry2d = { version = "0.15", optional = true } parry2d-f64 = { version = "0.15", optional = true } nalgebra = { version = "0.32.6", features = [ "convert-glam027", ], optional = true } serde = { version = "1", features = ["derive"], optional = true } derive_more = "0.99" indexmap = "2.0.0" fxhash = "0.2.1" itertools = "0.13" bitflags = "2.5.0" [dev-dependencies] examples_common_2d = { path = "../examples_common_2d" } benches_common_2d = { path = "../benches_common_2d" } bevy_math = { version = "0.14", features = ["approx"] } approx = "0.5" criterion = { version = "0.5", features = ["html_reports"] } insta = "1.0" [[example]] name = "dynamic_character_2d" required-features = ["2d", "default-collider"] [[example]] name = "kinematic_character_2d" required-features = ["2d", "default-collider"] [[example]] name = "ccd" required-features = ["2d", "default-collider"] [[example]] name = "chain_2d" required-features = ["2d", "default-collider"] [[example]] name = "collision_layers" required-features = ["2d", "default-collider"] [[example]] name = "custom_collider" required-features = ["2d"] [[example]] name = "fixed_joint_2d" required-features = ["2d", "default-collider"] [[example]] name = "move_marbles" required-features = ["2d", "default-collider"] [[example]] name = "prismatic_joint_2d" required-features = ["2d", "default-collider"] [[example]] name = "ray_caster" required-features = ["2d", "default-collider"] [[example]] name = "revolute_joint_2d" required-features = ["2d", "default-collider"] [[bench]] name = "pyramid" required-features = ["2d", "default-collider"] harness = false