diff --git a/DcCore/DcCore.xcodeproj/project.pbxproj b/DcCore/DcCore.xcodeproj/project.pbxproj index 1a8b776c4..94e080b5d 100644 --- a/DcCore/DcCore.xcodeproj/project.pbxproj +++ b/DcCore/DcCore.xcodeproj/project.pbxproj @@ -300,7 +300,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\nexport CFLAGS_x86_64_apple_darwin=\"-I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include\"\n\n# new location for system libraries on macOS 11\nos_ver=$(sw_vers -productVersion)\n \nif [[ \"$os_ver\" == 11.* ]]; then\n export LIBRARY_PATH=\"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib\"\nfi\n\n# the same on macOS 12, TODO: is there a less duplicate way to do this check?\nif [[ \"$os_ver\" == 12.* ]]; then\n export LIBRARY_PATH=\"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib\"\nfi\n\n# ensure all targets are installed\nrustup target add aarch64-apple-ios x86_64-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.\nRUSTFLAGS=\"-C lto=on -C embed-bitcode=yes\" \\\ncargo +`cat ../deltachat-ios/libraries/deltachat-core-rust/rust-toolchain` lipo --release --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\nexport CFLAGS_x86_64_apple_darwin=\"-I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include\"\n\n# new location for system libraries on macOS 11\nos_ver=$(sw_vers -productVersion)\n \nif [[ \"$os_ver\" == 11.* ]]; then\n export LIBRARY_PATH=\"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib\"\nfi\n\n# the same on macOS 12, TODO: is there a less duplicate way to do this check?\nif [[ \"$os_ver\" == 12.* ]]; then\n export LIBRARY_PATH=\"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib\"\nfi\n\n# ensure all targets are installed\nrustup target add aarch64-apple-ios x86_64-apple-ios --toolchain `cat ../rust-toolchain`\n\n# --xcode-integ determines --release and --targets from XCode's env vars.\n# Depending your setup, specify the rustup toolchain explicitly.\nRUSTFLAGS=\"-C lto=on -C embed-bitcode=yes\" \\\ncargo +`cat ../deltachat-ios/rust-toolchain` lipo --release --manifest-path ../deltachat-ios/libraries/deltachat-core-rust/deltachat-ffi/Cargo.toml\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/README.md b/README.md index 8e5bd5182..c5cd1702f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ 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` +rustup toolchain install `cat rust-toolchain` ``` To run the project, open `deltachat-ios.xcworkspace` (**not** the 'xcodeproj' file). diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 000000000..940573042 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +1.64.0