Support loading a build.rs
compiled .so
with -Zmiri-native-lib
#4077
Labels
A-native
Area: calling native functions via FFI
C-enhancement
Category: a PR with an enhancement or an issue tracking an accepted enhancement
It's common for projects to build C dependencies in the build-scripts of
-sys
dependencies. To be able to use these along with miri's new FFI support requires some weird contortions:(along with making the build script detect
CARGO_CFG_MIRI
and switch to outputting a shared object instead of the normal staticlib).It'd be nice if there were some way to inform miri about the native lib from the build script, similar to how we can tell the linker about the native libraries (maybe there's some way miri could reuse these cargo commands?).
The text was updated successfully, but these errors were encountered: