Rust Modernization & Code Quality#134
Merged
M1thieu merged 8 commits intoerematorg:mainfrom Sep 21, 2025
Merged
Conversation
- Migrate all 11 crates to Rust 2024 edition - Fix clippy warnings (unused imports, needless borrows, missing Default) - Cargo formatting as well along minor typos fixed
- Unique CI cache keys to prevent conflicts - Should solve future conflicts as well
- Add dynamic linking for faster compile times - Add SystemSets to ThermodynamicsPlugin for better system ordering - Add Default impl for AppliedForce component - Improve system organization following Bevy best practices
• Replace panic-prone Score::set() with robust clamping behavior • Enhance AI error messages from generic to descriptive debugging info • Optimize memory allocations via direct iteration over collect() chains • Modernize pattern matching with unwrap_or_default() and if-let expressions • Bundle Bevy system registration for improved scheduling performance • Clean up repetitive documentation patterns
• Add UtilityScore constants (ZERO, HALF, MAX) for common values • Consolidate repeated error messages in concurrent action systems • Extract trait value clamping to shared helper function • Replace magic numbers with named constants for configuration • Revert Score::set() to maintain compatibility • Remove external library references from documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request
Objective
Update to Rust 2024 edition and improve code maintainability.
Implementation
Rust Modernization
unwrap_or_default()AI System Improvements
Architecture
Testing
All examples run successfully:
basic_ai,basic_forces,basic_thermodynamicsBackward compatibility maintained - existing projects work without modification.
Technical Notes
Migration Requirements: None as all changes are backward compatible.
Future Considerations: Physics domains remain isolated for upcoming IRL physics implementation and bevy-mpm integration.
Limitations: Cross-domain integration deferred until physics rules are complete. Still waiting on MPM that I'm making slow progress but still progress, soon physics!