### Run 3D Example Source: https://github.com/dimforge/parry/blob/master/Claude.md Executes a specific example located in the parry3d crate, such as 'getting_started'. ```bash cargo run -p parry3d --example getting_started ``` -------------------------------- ### List All Examples in a Crate Source: https://github.com/dimforge/parry/blob/master/Claude.md Lists all available example files within a specified crate's examples directory. ```bash ls crates/parry3d/examples/ ``` -------------------------------- ### Run 2D Example Source: https://github.com/dimforge/parry/blob/master/Claude.md Executes a specific example located in the parry2d crate, such as 'getting_started'. ```bash cargo run -p parry2d --example getting_started ``` -------------------------------- ### Doc-Test Feature Gate Example Source: https://github.com/dimforge/parry/blob/master/Claude.md Demonstrates the correct way to use feature gates within doc-tests for Parry crates. It requires checking for both dimension and precision features to ensure compatibility across all variants. ```rust /// ```rust /// # #[cfg(all(feature = "dim3", feature = "f32"))] { /// use parry3d::shape::Ball; /// // ... example code ... /// # } /// ``` ``` -------------------------------- ### Build with SIMD Optimizations Source: https://github.com/dimforge/parry/blob/master/Claude.md Builds a crate with SIMD optimizations enabled. Ensure you are in the crate's directory. ```bash cd crates/parry3d && cargo build --features simd-stable ``` -------------------------------- ### Build Documentation Source: https://github.com/dimforge/parry/blob/master/Claude.md Generates documentation for the entire workspace, excluding dependencies. RUSTDOCFLAGS="-D warnings" treats warnings as errors. ```bash RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps ``` -------------------------------- ### Build Documentation with Private Items Source: https://github.com/dimforge/parry/blob/master/Claude.md Generates documentation for all workspace crates, including private items and dependencies. ```bash cargo doc --workspace --no-deps --document-private-items ``` -------------------------------- ### Build Workspace Documentation Source: https://github.com/dimforge/parry/blob/master/Claude.md Generates documentation for all crates in the workspace, excluding dependencies. ```bash cargo doc --workspace --no-deps ``` -------------------------------- ### Build with Serialization Features Source: https://github.com/dimforge/parry/blob/master/Claude.md Builds all workspace crates with support for bytemuck, serde, and rkyv serialization. ```bash cargo build --features bytemuck-serialize,serde-serialize,rkyv ``` -------------------------------- ### Build All Workspace Crates Source: https://github.com/dimforge/parry/blob/master/Claude.md Use this command to build all crates within the Parry workspace. ```bash cargo build ``` -------------------------------- ### Run Doc-Tests for All Variants Source: https://github.com/dimforge/parry/blob/master/Claude.md Runs documentation tests across all four crate variants (2D/3D, f32/f64). This is crucial for verifying cross-variant compatibility. ```bash cargo test --doc ``` -------------------------------- ### Format Code Source: https://github.com/dimforge/parry/blob/master/Claude.md Applies the project's standard code formatting to all files. ```bash cargo fmt ``` -------------------------------- ### Build All Parry Crates Source: https://github.com/dimforge/parry/blob/master/Claude.md Compiles all crates within the Parry project to ensure basic build integrity. ```bash cargo build -p parry2d cargo build -p parry3d ``` -------------------------------- ### Migrate from nalgebra to glam Source: https://github.com/dimforge/parry/blob/master/CHANGELOG.md Illustrates the conversion of common types and operations from nalgebra to glam for compatibility with rust-gpu. Points are now Vectors, and Unit wrappers are removed. ```rust use parry3d::na::{Point3, Vector3, Isometry3, Unit}; let point = Point3::new(1.0, 2.0, 3.0); let vector = Vector3::new(1.0, 0.0, 0.0); let normal = Unit::new_normalize(vector); let pos = Isometry3::translation(1.0, 2.0, 3.0); ``` ```rust use parry3d::math::{Vector, Pose}; let point = Vector::new(1.0, 2.0, 3.0); // Points are now Vector let vector = Vector::X; let normal = vector.normalize(); // No Unit wrapper let pos = Pose::translation(1.0, 2.0, 3.0); ``` -------------------------------- ### Build for WASM Target Source: https://github.com/dimforge/parry/blob/master/Claude.md Builds a specific crate for the WebAssembly target. Ensure you are in the crate's directory. ```bash cd crates/parry3d && cargo build --target wasm32-unknown-unknown ``` -------------------------------- ### Build Specific Parry Crate Source: https://github.com/dimforge/parry/blob/master/Claude.md Builds a particular crate, such as parry3d or parry2d. ```bash cargo build -p parry3d ``` ```bash cargo build -p parry2d ``` -------------------------------- ### Build with Enhanced Determinism Source: https://github.com/dimforge/parry/blob/master/Claude.md Builds crates with enhanced determinism features. Note: This is incompatible with SIMD features. ```bash cargo build --features enhanced-determinism ``` -------------------------------- ### Run All Tests Source: https://github.com/dimforge/parry/blob/master/Claude.md Executes all tests across the entire workspace. ```bash cargo test ``` -------------------------------- ### Check Code Formatting Source: https://github.com/dimforge/parry/blob/master/Claude.md Verifies that the code adheres to the project's formatting standards. This check is required before committing. ```bash cargo fmt -- --check ``` -------------------------------- ### Run a Single Test by Name Source: https://github.com/dimforge/parry/blob/master/Claude.md Executes a specific test case identified by its name. ```bash cargo test test_name ``` -------------------------------- ### Run Tests with Specific Features Source: https://github.com/dimforge/parry/blob/master/Claude.md Runs tests while enabling specific features like 'wavefront' or 'parallel'. ```bash cargo test --features wavefront ``` ```bash cargo test --features parallel ``` -------------------------------- ### Run Clippy Linter Source: https://github.com/dimforge/parry/blob/master/Claude.md Executes the Clippy linter to catch common Rust code issues and style problems. Warnings are treated as errors in CI. ```bash cargo clippy ``` -------------------------------- ### Run Clippy for Linting Source: https://github.com/dimforge/parry/blob/master/Claude.md Checks for common mistakes and style issues using Clippy. The RUSTFLAGS="-D warnings" flag treats warnings as errors. ```bash RUSTFLAGS="-D warnings" cargo clippy ``` -------------------------------- ### Conditional Compilation for Precision Source: https://github.com/dimforge/parry/blob/master/Claude.md Shows how to use conditional compilation and re-exports to select between f32 and f64 precision based on enabled features. ```rust #[cfg(feature = "f32")] pub use f32 as Real; #[cfg(feature = "f64")] pub use f64 as Real; ``` -------------------------------- ### Run Tests for a Specific Crate Source: https://github.com/dimforge/parry/blob/master/Claude.md Executes all tests only for the specified crate, e.g., parry3d. ```bash cargo test -p parry3d ``` -------------------------------- ### Conditional Compilation for Dimensions Source: https://github.com/dimforge/parry/blob/master/Claude.md Illustrates how to use conditional compilation attributes to include code specific to 2D or 3D dimensions. ```rust #[cfg(feature = "dim2")] // 2D-specific code #[cfg(feature = "dim3")] // 3D-specific code ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.