Skip to content

Conversation

@NiseVoid
Copy link
Contributor

Objective

bevy_math does not work when no alloc is available despite the existance of the alloc feature which should gate all logic that requires it. Support for no std + no alloc can be useful for some embedded usecases, for example using bevy_math types on the GPU using Rust GPU.

Solution

Swap smallvec out with arrayvec, and fix two minor uses of alloc::slice::sort_by (not available on core because they allocate Vecs internally)

Testing

  • Unit tests still pass
  • I was able to compile a shader with Rust GPU while depending on bevy_math

@NiseVoid NiseVoid added A-Math Fundamental domain-agnostic mathematical operations P-Compile-Failure A failure to compile Bevy apps O-Embedded Weird hardware and no_std platforms S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 28, 2025
@Jondolf Jondolf added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 30, 2025
@mockersf mockersf added this pull request to the merge queue Nov 30, 2025
Merged via the queue into bevyengine:main with commit 18cd93f Nov 30, 2025
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Math Fundamental domain-agnostic mathematical operations O-Embedded Weird hardware and no_std platforms P-Compile-Failure A failure to compile Bevy apps S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants