Browse Source

improve rust installation

dignifiedquire 6 years ago
parent
commit
72cc96d1ca
2 changed files with 3 additions and 1 deletions
  1. 2 0
      README.md
  2. 1 1
      deltachat-ios.xcodeproj/project.pbxproj

+ 2 - 0
README.md

@@ -28,6 +28,8 @@ You need to install [rustup](https://rustup.rs/) with rust, as well as [cargo-li
 $ git clone git@github.com:deltachat/deltachat-ios.git
 $ cd deltachat-ios
 $ git submodule update --init --recursive
+# Make sure the correct rust version is installed
+$ rustup toolchain install `cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain``
 $ open deltachat-ios.xcworkspace # do not: open deltachat-ios.xcodeproj
 ```
 

+ 1 - 1
deltachat-ios.xcodeproj/project.pbxproj

@@ -602,7 +602,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# The $PATH used by XCode likely won't contain Cargo, fix that.\n# This assumes a default `rustup` setup.\nexport PATH=\"$HOME/.cargo/bin:$PATH\"\n\n# --xcode-integ determines --release and --targets from XCode's env vars.\n# Depending your setup, specify the rustup toolchain explicitly.\ncargo lipo --xcode-integ --manifest-path deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi/Cargo.toml\n";
+			shellScript = "# The $PATH used by XCode likely won't contain Cargo, fix that.\n# This assumes a default `rustup` setup.\nexport PATH=\"$HOME/.cargo/bin:$PATH\"\n\n# ensure all targets are installed\nrustup target add aarch64-apple-ios x86_64-apple-ios armv7-apple-ios i386-apple-ios --toolchain `cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain`\n\n# --xcode-integ determines --release and --targets from XCode's env vars.\n# Depending your setup, specify the rustup toolchain explicitly.\ncargo +`cat deltachat-ios/libraries/deltachat-core-rust/rust-toolchain` lipo --xcode-integ --manifest-path deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi/Cargo.toml\n";
 		};
 /* End PBXShellScriptBuildPhase section */