-
Notifications
You must be signed in to change notification settings - Fork 25
Modernize Codebase to Rust 2024 and Fix Critical CDT Issues #17
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
Open
virtualritz
wants to merge
24
commits into
Formlabs:master
Choose a base branch
from
virtualritz:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Major changes: - Migrate entire workspace to Rust 2024 edition. - Update GUI to use wgpu v26 and winit v0.30 APIs. - Fix all dead_code warnings with #[expect(dead_code)] attributes. - Fix all lifetime elision warnings in express crate. - Fix nom 7 API compatibility (fold_many requires closures). - Add CLAUDE.md documentation for future Claude instances. GUI/Rendering fixes: - Migrate from deprecated winit event loop to ApplicationHandler trait. - Fix shader syntax from [[attributes]] to @attributes for modern WGSL. - Handle empty meshes gracefully with early exit and error message. - Fix empty buffer panics in camera.rs and model.rs. - Add checks for empty vertex arrays in camera::fit_verts. - Update Surface to use Arc<Window> for proper lifetime management. - Replace SwapChain with SurfaceConfiguration API. Express/Parser improvements: - Fix 220+ lifetime elision warnings with explicit annotations. - Fix alias macro to handle lifetimes correctly with IResult. - Rename to_rtype_build to build_rtype (clippy wrong_self_convention). - Make to_inner_rtype a static method (clippy only_used_in_recursion). - Remove redundant closures (String::new instead of || String::new()). - Collapse nested if statements with if-let chains. - Fix fold_many0/fold_many1 to use closures for initial values. Code quality: - Format imports alphabetically across all crates. - Apply rustfmt to all modified files. - Use if-let chains for cleaner pattern matching. - Update dependencies to latest compatible versions. - Fix all clippy warnings at default level.
Major changes: - Migrate entire workspace to Rust 2024 edition. - Update GUI to use wgpu v26 and winit v0.30 APIs. - Fix all dead_code warnings with #[expect(dead_code)] attributes. - Fix all lifetime elision warnings in express crate. - Fix nom 7 API compatibility (fold_many requires closures). GUI/Rendering fixes: - Migrate from deprecated winit event loop to ApplicationHandler trait. - Fix shader syntax from [[attributes]] to @attributes for modern WGSL. - Handle empty meshes gracefully with early exit and error message. - Fix empty buffer panics in camera.rs and model.rs. - Add checks for empty vertex arrays in camera::fit_verts. - Update Surface to use Arc<Window> for proper lifetime management. - Replace SwapChain with SurfaceConfiguration API. Express/Parser improvements: - Fix 220+ lifetime elision warnings with explicit annotations. - Fix alias macro to handle lifetimes correctly with IResult. - Rename to_rtype_build to build_rtype (clippy wrong_self_convention). - Make to_inner_rtype a static method (clippy only_used_in_recursion). - Remove redundant closures (String::new instead of || String::new()). - Collapse nested if statements with if-let chains. - Fix fold_many0/fold_many1 to use closures for initial values. Code quality: - Format imports alphabetically across all crates. - Apply rustfmt to all modified files. - Use if-let chains for cleaner pattern matching. - Update dependencies to latest compatible versions. - Fix all clippy warnings at default level.
Update rand API calls from deprecated methods to new ones: - Replace gen_range with random_range - Replace thread_rng().gen() with rng().random() Update CDT tests to expect HullMismatch error for problematic cases that now properly return errors instead of panicking.
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.
TLDR; This PR improves stability and maintainability of Foxtrot while bringing it up to current Rust ecosystem standards.
Rust 2024 Edition
rustfmtandclippyfixes across all crates.GUI/Rendering
wgpuv26 andwinitv0.30 APIs.winitevent loop withApplicationHandlertrait.[[attributes]]to@attributessyntax.Surfacelifetime management withArc.Bug Fixes
cdttriangulation when processing complex models (e.g., Raspberry Pi 4 STEP file).Error::HullMismatchvariant.cdtinput that was causing crashes.Detailed Changes
Express Parser Improvements
nom7 API compatibility (fold_many0/fold_many1now use closures).IResultusage.clippyrecommendations (renamed methods, removed redundant closures).Code Quality
parallelfeature torayonand enabled by default.cargo-sortfor consistent dependency ordering.cdtImprovementsTesting
cdtscenarios.