-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add no_std
support to bevy_mikktspace
#15528
Add no_std
support to bevy_mikktspace
#15528
Conversation
Rely on `libm` for maths operations not supported in `core`.
@@ -1808,3 +1809,63 @@ unsafe fn GenerateInitialVerticesIndexList<I: Geometry>( | |||
} | |||
return iTSpacesOffs; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to keep the cfg feature hell in one place. This does remind me of the functionality of bevy_math::ops
, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think it would make sense to move this into bevy_math
, but that's a much harder change since it includes (comparatively) lots of dependencies. For now I think this is an acceptable mess, but highlights the need for possible changes.
# Objective - Contributes to bevyengine#15460 - Allows `bevy_mikktspace` to be used in `no_std` contexts. ## Solution - Added `std` (default) and `libm` features which control the inclusion of the standard library. To use `bevy_mikktspace` in `no_std` environments, enable the `libm` feature. ## Testing - CI - `cargo clippy -p bevy_mikktspace --target "x86_64-unknown-none" --no-default-features --features libm`
Objective
no_std
Bevy #15460bevy_mikktspace
to be used inno_std
contexts.Solution
std
(default) andlibm
features which control the inclusion of the standard library. To usebevy_mikktspace
inno_std
environments, enable thelibm
feature.Testing
cargo clippy -p bevy_mikktspace --target "x86_64-unknown-none" --no-default-features --features libm