Skip to main content

boxdd_sys/
ffi.rs

1#![allow(clippy::approx_constant)]
2
3#[cfg(all(
4    target_family = "wasm",
5    not(any(
6        all(target_arch = "wasm32", target_os = "unknown", target_env = ""),
7        all(target_arch = "wasm32", target_os = "wasi", target_env = "p1")
8    ))
9))]
10compile_error!("boxdd-sys supports WASM targets only for wasm32-unknown-unknown and wasm32-wasip1");
11
12include!(env!("BOXDD_SYS_BINDINGS_FILE"));
13
14/// Default collision mask exported by Box2D's public C API.
15pub const B2_DEFAULT_MASK_BITS: u64 = u64::MAX;
16
17/// Whether the linked Box2D library was compiled with validation enabled.
18#[cfg(feature = "validate")]
19pub const B2_ENABLE_VALIDATION: u32 = 1;
20
21/// Whether the linked Box2D library was compiled with validation enabled.
22#[cfg(not(feature = "validate"))]
23pub const B2_ENABLE_VALIDATION: u32 = 0;
24
25#[cfg(feature = "double-precision")]
26pub use b2CreateWorldDoublePrecision as b2CreateWorld;