Cargo Features

[dependencies]
parry2d = { version = "0.26.0", default-features = false, features = ["std", "alloc", "required-features", "dim2", "f32", "serde-serialize", "rkyv", "bytemuck-serialize", "simd-stable", "simd-nightly", "enhanced-determinism", "parallel", "spade", "improved_fixed_point_support", "encase", "simd-is-enabled"] }

[lints]
workspace = true

default = required-features, spade, std

These default features are set whenever parry2d is added without default-features = false somewhere in the dependency tree.

std default = alloc, ena, slab

Enables std of arrayvec, glamx, simba, optional spade, and thiserror

glamx:

Standard library support

Affects validation::check_convex_hull

alloc spade std = hashbrown

Affects parry2d::transformation, query::epa, query_dispatcher::PersistentQueryDispatcher, composite_shape::CompositeShape, composite_shape::TypedCompositeShape, shape::composite_shape, shape::Shape.clone_box, shape::Shape.clone_dyn, shape::Shape.scale_dyn, shape::Shape.as_composite_shape, utils::hashmap, utils::hashset, shape::RoundConvexPolyhedron, shape::RoundConvexPolygon

required-features default = dim2, f32
dim2 required-features

Affects math::DIM, clip_segment_segment::clip_segment_segment_with_normal, contact_manifold::ContactManifold.points, contact_manifolds_capsule_capsule::contact_manifold_capsule_capsule, epa::epa2, nonlinear_rigid_motion::NonlinearRigidMotion.angvel, sat_cuboid_segment::segment_cuboid_find_local_separating_normal_oneway, sat_cuboid_triangle::triangle_support_map_find_local_separating_normal_oneway, sat_cuboid_triangle::triangle_cuboid_find_local_separating_normal_oneway, shape_cast_heightfield_shape::cast_shapes_heightfield_shape, convex_hull2::convex_hull2, utils::push_xy_arc, ccw_face_normal::ccw_face_normal, utils::point_in_triangle, math::ivect_to_vect, math::ivect_to_vect, math::vect_to_ivect, math::vect_to_ivect, shape::RoundConvexPolygon

f32 required-features

Affects math::ivect_to_vect, math::ivect_to_vect, math::vect_to_ivect, math::vect_to_ivect

serde-serialize = serde, serde_arrays

Enables serde of arrayvec, bitflags, glamx, optional hashbrown, and optional spade

glamx:

Serialization features

Affects hashmap::serialize_hashmap_capacity, hashmap::deserialize_hashmap_capacity, hashset::serialize_hashset_capacity, hashset::deserialize_hashset_capacity

rkyv

Enables rkyv and rkyv of glamx

glamx:

Rkyv serialization

bytemuck-serialize = bytemuck

Enables bytemuck of glamx

glamx:

Bytemuck support

simd-stable = simd-is-enabled

Enables wide of simba

simd-nightly = simd-is-enabled

Enables portable_simd of simba

enhanced-determinism = indexmap

Enables libm_force of simba and libm of glamx

glamx:

Math library features

Affects hashmap::FxHashMap32, hashset::FxHashSet32

parallel = rayon
spade default = alloc

Enables spade

improved_fixed_point_support
encase

Enables encase, encase of glamx

simd-is-enabled simd-nightly? simd-stable?

Do not enable this feature directly. It is automatically enabled with the "simd-stable" or "simd-nightly" feature.

Affects wops::simd_swap

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

slab std
serde serde-serialize?
serde_arrays serde-serialize?
indexmap enhanced-determinism?
hashbrown alloc?
rayon parallel?
bytemuck bytemuck-serialize?
ena std