Closed juliettebee closed 1 year ago
Unfortunately, we don't have much expertise in the project exporting to iOS as you might notice from the long time TODO in the iOS section.
Rust does support iOS out of the box, but there is no guide that we have available for this kind of scenario at the moment: https://godot-rust.github.io/book/faq/support.html?highlight=ios#which-platforms-are-supported
As GDNative is a kind of library this guide may be a good starting point: https://mozilla.github.io/firefox-browser-architecture/experiments/2017-09-06-rust-on-ios.html
@juliettebee I would like to share with you my tutorial (iOS Godot Tutorial). In the tutorial the most important step starts at 4:24 where you need to defined the gdnlib. Please note that this tutorial used an older version of the godot-rust lib however the same basics should apply.
Please note that in case you want to build a lib for all the different architectures on iOS the following code might also be useful for you. So this will generate all the libs. Next you could use lipo to combine the aarch64-apple-ios-sim and x86_64-apple-ios lib builds into one file
sample code: ` cargo build --target x86_64-apple-ios --release cargo build --target aarch64-apple-ios-sim --release cargo build --target aarch64-apple-ios --release
lipo -create ./target/aarch64-apple-ios-sim/release/YOUR_LIB_NAME.a ./target/x86_64-apple-ios/release/YOUR_LIB_NAME.a -output ./ios_build/YOUR_LIB_NAME_SIM.a
lipo -create ./target/aarch64-apple-ios/release/YOUR_LIB_NAME_SIM.a -output ./ios_build/YOUR_LIB_NAME_SIM.a `
Hope that helps
Closing as answered :tada:
Hello, I have a project and I built the rust portion with
cargo build --release --target aarch64-apple-ios
and I put it in the GDNativeLibrary path thingy with that dylib. Then I followed the instructions in the documentation for Godot but I'm gettingERROR: does not have a library for the current platform
when I run it. How can I fix this?