-
Notifications
You must be signed in to change notification settings - Fork 16
Description
I would like to version this exactly like liburing - release the first non-prerelease version at 1.0.3 linked to the commit that is liburing's 0.3 release. liburing has a strong backwards compatibility story (axboe/liburing#34) so in an ideal world that would be fine.
However, C allows certain patterns that liburing takes advantage of, which cannot be replicated in Rust as a non-breaking change. In particular, I'm thinking of unions inside of structs. Liburing can add a new field which overlaps with another by turning the old field into a union. For example, it did this by chaning the __u64 off; field of io_uring_sqe into union { __u64 off; __u64 addr2; }.
Rust cannot emulate this, and we are required to replace the field with a new union type (which is why Rust's io_uring_sqe has a type called off_addr2).
Can't think of a perfect solution to handle this. Options I can think of are:
- Make a major version bump if this ever happens.
- Put at least some of the structs under some sort of unstable feature flag.
- Just allow the breaking change in a minor version on the hope it won't impact anyone.