Skip to content

Conversation

goto-bus-stop
Copy link
Contributor

@goto-bus-stop goto-bus-stop commented Aug 14, 2020

This is a breaking change.

bindgen switched the default output for parameters with the size_t C type to u32/u64 depending on the target platform. Per rust-lang/rust-bindgen#1671, the old behaviour where size_t would just output usize is not technically correct, because the C standard has a slightly different definition for size_t.

AFAIK it is correct for all platforms that Node.js supports though. bindgen added a toggle to opt back in to the old behaviour. Since bindgen had been doing this for years without issue, I think we're safe 🤔

This is a breaking change.
@elmarx
Copy link
Owner

elmarx commented Aug 14, 2020

OK, that makes sense, especially when reading the linked issue. Even https://github.com/fishinabarrel/linux-kernel-module-rust seems to opt for size_t_is_usize

I hope the breaking change is not too painful :/ At least it's pre 1.0 ;)

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