Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information for rust-bitcode #5

Merged
merged 1 commit into from
May 10, 2021
Merged

Add information for rust-bitcode #5

merged 1 commit into from
May 10, 2021

Conversation

ineiti
Copy link
Contributor

@ineiti ineiti commented May 3, 2021

The installation instructions were missing for the iOS part.
Also some of the import parts in the xcode project were wrong.

Closes #4

The installation instructions were missing for the iOS part.
Also some of the import parts in the xcode project were wrong.
@ineiti ineiti mentioned this pull request May 3, 2021
@@ -1,15 +1,15 @@
#!/bin/bash

# Ensure that `cargo` is in PATH, using the default location.
export PATH="$PATH:${HOME}/.cargo/bin"
. "$HOME/.cargo/env"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -106,12 +106,26 @@ rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-and

## iOS specific steps

- Add targets
- Install rust 1.46.0 with MacOSX binary support
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS :)

@ivnsch
Copy link
Owner

ivnsch commented May 3, 2021

It works, thanks 👍! can we can do something to not have to specify the version in the app's script (and ideally use a placeholder in the instructions too)?

@ineiti
Copy link
Contributor Author

ineiti commented May 4, 2021

Did you test it on a clean repo? I had to compile it manually once for all the rust libraries, and then let Xcode do the compiling of the main rust code and the linking.

With regard to multiple versions, this might be a bit tricky. The ~/.rustup/toolchains can hold multiple directories.

  • should it just chose the first that starts with ios-arm64?
  • Or complain if there are multiple ios-arm64, but take the one available if there is only one?

@ivnsch
Copy link
Owner

ivnsch commented May 4, 2021

Hmm I had to run

cargo +ios-arm64-1.46.0 build --target aarch64-apple-ios --release --lib
cargo build --target=x86_64-apple-ios --release

directly on the terminal once.. it seems that there are linker issues when the script is executed from Xcode.

"note: ld: library not found for -lSystem "

Maybe related? TimNN/cargo-lipo#41

Let's skip the version thing for now, rust-bitcode's last stable release is from about 6 months ago, so not that much of an issue.

@ivnsch ivnsch merged commit 6cadc3b into ivnsch:master May 10, 2021
@ivnsch
Copy link
Owner

ivnsch commented May 10, 2021

Thanks for your contribution!

@ineiti ineiti deleted the use_1.46.0 branch May 11, 2021 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS dependencies
2 participants