Improve safety of bevy_mikktspace #7372
Labels
A-Rendering
Drawing game state to the screen
C-Code-Quality
A section of code that is hard to understand or change
C-Dependencies
A change to the crates that Bevy depends on
P-Unsound
A bug that results in undefined compiler behavior
What problem does this solve or what need does it fill?
I'm the original author of the port of the mikktspace library to generated Rust code. While this originally solved its purpose of making the crate easier to compile to WASM targets without the need for a C compiler, the auto-generated code with heavy manual fixes was always meant to be replaced eventually. See:
What solution would you like?
I do not think that unsafety is necessary for the majority of this algorithm, its maintainability can be improved without a bit hit on performance by starting to port more sections of it to idiomatic rust, with appropriate benchmarks and tests to validate the process.
What alternative(s) have you considered?
Re-implementing from scratch isn't particularly useful as it's a small enough surface area where a gradual port would work better. The original crate does still exist too and improvements could be made there, I couldn't quite find the reason for the fork, was this just to make it easier to maintain?
The text was updated successfully, but these errors were encountered: