Crates.io | box2d-rs |
lib.rs | box2d-rs |
version | 0.0.4 |
source | src |
created_at | 2020-11-20 11:34:04.057386 |
updated_at | 2023-05-12 08:38:47.412002 |
description | Port of Box2d to Rust |
homepage | |
repository | https://github.com/humman/box2d-rs |
max_upload_size | |
id | 314324 |
size | 795,468 |
A native port of Box2D to Rust.
Minimum Rust version: 1.56.0 (1.61 for dev-dependecies)
When porting, I pursued the following goals
serde_support
feature). Serialized data available in serialize_test
directoryAdd this to your Cargo.toml
:
[dependencies]
box2d-rs = "0.0.4"
If you want serialize/deserialize world with serde:
[dependencies]
box2d-rs = { version = "0.0.4", features = ["serde_support"] }
Build and run testbed in debug mode:
# At the reposity root
cargo build --examples --tests
cargo run --example testbed
In debug mode with serde_support
:
cargo build --examples --tests --features serde_support
cargo run --example testbed --features serde_support
Release version with serde_support
:
cargo build --examples --tests --release --features serde_support
cargo run --example testbed --release --features serde_support
Run tests
cargo test --features serde_support
Optionally, the following dependencies can be enabled:
serde_support
enables serialize/deserialize of world via the serde
crate