Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds GPU acceleration benchmarking support for Rapier 3D in both the main crate and the examples, and introduces new dependencies and features to enable GPU compute via WGPU. The changes include the addition of benchmarking binaries and infrastructure for comparing CPU and GPU performance, as well as the configuration needed to support GPU acceleration in both the single-precision and double-precision versions of the 2D and 3D crates.
GPU Acceleration Feature and Dependencies
gpu-accelerationtorapier2d,rapier2d-f64,rapier3d, andrapier3d-f64, which enables GPU compute support via the WGPU backend. This includes new optional dependencies onwgpu,bytemuck, andpollster. [1] [2] [3] [4] [5] [6] [7] [8]Benchmarking Infrastructure
gpu_benchmarkstorapier3d(and similarly forrapier2d), which benchmarks CPU vs GPU performance for physics operations, printing a summary table. This is only built when thegpu-accelerationfeature is enabled. [1] [2] [3]gpu_benchmarkinexamples3d, providing a similar CPU vs GPU benchmark for user experimentation. [1] [2]Benchmark Implementation
Development and Testing Improvements
criterionas a development dependency (for benchmarking with HTML reports) and configured the new GPU benchmarks to run only when thegpu-accelerationfeature is enabled. [1] [2]These changes lay the groundwork for further GPU compute integration and provide both automated and example-driven ways to measure performance gains.