Skip to content
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

Rust 1.77 toolchain - Fix alignment and layout for z_owned_reply_t #295

Closed
wants to merge 3 commits into from

Conversation

Mallets
Copy link
Member

@Mallets Mallets commented Mar 22, 2024

Rust 1.77 has been released: https://releases.rs/docs/1.77.0/
Along with 1.77 it comes the following change: rust-lang/rust#116672

This means that u128 have now a different alignment on x86 targets, making the compilation of zenoh-c to fail on x86 when compiled with Rust 1.77.

This patch fixes the memory layout and alignment of the z_owned_reply_t affected by that change.

However, I suggest to not merge this PR straight away since there are projects that depend on main branch of zenoh-c and they will not use Rust 1.77. E.g.: https://github.com/ros2/rmw_zenoh will use the Rust shipped version in Ubuntu 24.04, which is 1.75.

An option could be to have different layout depending on the compiler version but this capability seems to be still unstable: https://doc.rust-lang.org/unstable-book/language-features/cfg-version.html
A larger change may be hence needed in Zenoh, particularly in the ZenohId type to avoid using u128 at all.

@eclipse-zenoh-bot
Copy link
Contributor

@Mallets If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

@Mallets
Copy link
Member Author

Mallets commented Mar 25, 2024

Superseded by #298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants