uniffi-rs icon indicating copy to clipboard operation
uniffi-rs copied to clipboard

Create better framework for Swift dylibs when testing

Open bendk opened this issue 3 years ago • 0 comments

The way we build Swift dylibs for testing is pretty weird. There's 2 libraries involved: the library build from the Rust crate, and the library built from the autogenerated bindings t code.

In compile_bindings(), we hardcode the bindings library extension as .dylib. This seems very odd, since the file command reports this as an ELF library, not a mach one which the extension implies.

Eventually, we should use one of the DLL_SUFFIX value from std::env::const, however that .dylib extension is actually doing some work for us, because otherwise some of our test fixtures would use the same filename for both the rust crate and the bindings code (libcallbacks.so for the callbacks example).

┆Issue is synchronized with this Jira Task ┆friendlyId: UNIFFI-145

bendk avatar Mar 29 '22 23:03 bendk