-
Notifications
You must be signed in to change notification settings - Fork 5
Migrate to Rust Edition 2024 #76
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
Conversation
|
The tests seem to fail because, when creating the eCAL version auto-select system, I didn't consider that the API returns releases in the order they were released, not in SemVer order. Currently, the setup is selecting 5.13.4 instead of 6.0.0. |
|
I’ve rebased everything on |
|
@LeWimbes great! Thank you. |
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.
Pull Request Overview
This PR migrates the project from Rust Edition 2021 to Rust Edition 2024 and adds Resolver Version 3. The changes ensure compatibility with Rust Edition 2024 requirements, including explicit unsafe blocks in extern "C" functions and updated import ordering to match the new edition's conventions.
- Updates all Cargo.toml files to use edition = "2024"
- Adds resolver = "3" to the workspace configuration
- Updates dependency versions (prost from 0.13 to 0.14, bindgen from 0.71 to 0.72)
- Adds explicit unsafe blocks within extern "C" functions as required by Edition 2024
- Reorders imports to match Edition 2024 conventions (alphabetical ordering)
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Adds resolver = "3" and fixes trailing comma |
| rustecal*/Cargo.toml | Updates edition to "2024" across all crates |
| rustecal-sys/Cargo.toml | Updates bindgen dependency from 0.71 to 0.72 |
| rustecal-types-protobuf/Cargo.toml | Updates prost dependency from 0.13 to 0.14 |
| person_send/Cargo.toml, person_receive/Cargo.toml | Updates prost and prost-build to 0.14 |
| rustecal-pubsub/src/payload_writer.rs | Adds explicit unsafe blocks in extern "C" functions |
| Multiple import files | Reorders imports alphabetically per Edition 2024 conventions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
This PR updates the project to Rust Edition 2024 and Resolver Version 3.
While updating the dependencies, I chose not to specify the patch version for
prost(0.14instead of0.14.1) since it never seemed to be specified for other dependencies. Please let me know if this was not your intention.Rust Edition 2024 requires the explicit use of unsafe blocks in the
unsafe extern "C"functions. For now, I have used the blocks in a way that gives them minimal scope. Of course, we could also wrap the entire function bodies inunsafeblocks. Let me know what you prefer.Checklist
cargo check,cargo test)