You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #73516 added support of cdylib crate types on iOS. This new feature in Rust 1.46 added a lot of headache for iOS builds with cdylib targets. cdylib target is near impossible to build on iOS if you are using any crate with native dependencies (ex. openssl, libsodium, zmq). You can't just find .so files for all architectures to perform correct linking and any vendored build paths don't support iOS properly. Usual workflow is the following:
You build staticlib and rely that native dependencies will be linked as frameworks later
You setup right cocoapods in ObjectiveC/Swift wrapper.
As cargo doesn't support platform-dependent crate types rust-lang/cargo#4881 as a result a lot of projects that require iOS support are now broken on Rust 1.46.
Also seems usual iOS tools like cargo lipo don't support crate type overrides for the moment.
It works on 1.45 well because cargo just skips unsupported crate types on iOS and Android.
The text was updated successfully, but these errors were encountered:
I filed a PR in Cargo that makes it easier to switch crate-types at any step of your workflow: rust-lang/cargo#8789. This allows running cargo build --crate-type staticlib to override the crate type of the "final" product (not necessarily its dependencies), which is what most of us want. Would that be helpful in your situation?
PR #73516 added support of
cdylib
crate types on iOS. This new feature in Rust 1.46 added a lot of headache for iOS builds withcdylib
targets.cdylib
target is near impossible to build on iOS if you are using any crate with native dependencies (ex. openssl, libsodium, zmq). You can't just find .so files for all architectures to perform correct linking and any vendored build paths don't support iOS properly. Usual workflow is the following:staticlib
and rely that native dependencies will be linked as frameworks laterAs cargo doesn't support platform-dependent crate types rust-lang/cargo#4881 as a result a lot of projects that require iOS support are now broken on Rust 1.46.
Also seems usual iOS tools like
cargo lipo
don't support crate type overrides for the moment.It works on 1.45 well because cargo just skips unsupported crate types on iOS and Android.
The text was updated successfully, but these errors were encountered: