danielhenrymantilla / rust-uninit

Read trait fixed to soundly work with uninitalized memory
MIT License
25 stars 2 forks source link

Remove `rlib` crate-type so that it works with Miri #4

Closed danielhenrymantilla closed 3 years ago

danielhenrymantilla commented 3 years ago

Having

[lib]
crate-type = ["rlib"]

breaks compilation with miri (cc @ralfjung, maybe that should be mentioned in the README.md).

Now, I cannot remember why I put that "rlib" thing to begin with, but after looking in more detail into what it does, I think it's doing do more harm than any potential good (or, at least, I should be using ["rlib", "lib"] to avoid removing "lib" when with some compiler (such as miri's?) it isn't an alias for "rlib". And until somebody observes some breakage from replacing "rlib" back with the default "lib", I will be favoring the default setting).

RalfJung commented 3 years ago

maybe that should be mentioned in the README.md

At first sight this sounds like a bug, though depending on how cargo handles this the bug might be hard to fix. Could you open an issue in the Miri issue tracker, together with your reproducible example?

danielhenrymantilla commented 3 years ago

Since https://github.com/rust-lang/miri/pull/1709 has been merged, which solves https://github.com/rust-lang/miri/issues/1691, the issue tracking the limitation that motivated this very PR, the PR is no longer needed and can be dismissed.