Open tbillington opened 9 months ago
Thanks for the PR @tbillington.
Since the bitcode
library is unstable we can't add support to uuid
without also requiring the uuid_unstable
rustflag be set too. The zerocopy
support has an example of how to do this. Needing to set a flag at build-time makes these unstable features largely unsuitable for libraries, but can be used by applications that are willing to opt-in to it.
Would you be happy to add the extra uuid_unstable
cfg to this?
Oh interesting, I can look into that 👍
When you say the library in unstable, what exactly do you mean?
Ah I just mean that the library is pre-1.0, so breaking changes are still expected. If the library does make breaking changes then we'll either need to make a breaking change in uuid
too to adopt it, or create another feature to support it. Having the unstable opt-in RUSTFLAG is a balance between adding support for new libraries, and insulating uuid
from breaking changes in its dependencies.
Another solution is to specify bitcode = { version = "0", features = ["derive"], default-features = false, optional = true }
and only use #[derive(Encode, Decode)]
. These apis are considered a stable subset of bitcode. Then users of uuid can choose the major version of bitcode.
Happy to make the change caibear suggested, would that still require uuid_unstable
?
Hmm, I wouldn't be comfortable taking on this kind of stability policy in uuid
. I'd be more than happy to accept this under the same unstable policy as zerocopy
though.
Hello I've created a PR to add support for UUID
in bitcode
. I think it is better if we add the support there instead of here. https://github.com/SoftbearStudios/bitcode/pull/34
This pr adds support for
bitcode
, commonly used by bevy games for it's more compact representation.