Skip to content

Remove dependency on memoffset#925

Merged
mrDIMAS merged 1 commit into
FyroxEngine:masterfrom
syberant:master
Jul 8, 2026
Merged

Remove dependency on memoffset#925
mrDIMAS merged 1 commit into
FyroxEngine:masterfrom
syberant:master

Conversation

@syberant

@syberant syberant commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Hi, I may or may not have used your crate but I'd like to say a quick thank you for it anyway!
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 which I believe is at or below your MSRV.

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 :)

Related Issue(s)

N/A

Review Guidance

None

Screenshots/GIFs

N/A

Checklist

  • My code follows the project's code style guidelines (I ran cargo fmt)
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (N/A?)
  • My changes don't generate new warnings or errors
  • No unsafe code introduced (or if introduced, thoroughly justified and documented)

`memoffset::offset_of!` was stabilised as `core::mem::offset_of!` in
rust 1.77
@mrDIMAS mrDIMAS merged commit fa4a4d4 into FyroxEngine:master Jul 8, 2026
7 of 11 checks passed
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