Skip to content

Remove dependency on memoffset for target_os = "windows"#361

Open
syberant wants to merge 1 commit into
mozilla:ctap2-2021from
syberant:ctap2-2021
Open

Remove dependency on memoffset for target_os = "windows"#361
syberant wants to merge 1 commit into
mozilla:ctap2-2021from
syberant:ctap2-2021

Conversation

@syberant

@syberant syberant commented Jul 7, 2026

Copy link
Copy Markdown

Hi, thanks for firefox!
I'm going down the list of reverse dependencies on memoffset.

This PR aims to remove the memoffset crate from your dependencies.
core::mem::offset_of was stabilised in rustc 1.77.

The memoffset crate 0.9.1 says that

If you're using a rustc version greater or equal to 1.77,
this crate's offset_of!() macro simply forwards to core::mem::offset_of!().

I consider it very unlikely (see here) for any usage of the offset_of! macro to break but please check anyway.
I hope we can all enjoy the benefits of one less dependency :)


Your MSRV is unclear to me but this implies it's currently 1.90, maybe set it in Cargo.toml?
If that is correct this comment can also be followed up on.

`memoffset::offset_of!` was stabilised as `core::mem::offset_of!` in
rust 1.77

@jschanck jschanck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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