Jelajahi Sumber

Move rust-toolchain file from the core repository (#1781)

* Move rust-toolchain file from the core repository

This way updating the core does not automatically update
toolchain version and any toolchain can be used as long
as it can build the core.

* adapt path to `rust-toolchain`

`rust-toolchain` is accessed from `DcCore` subdirectory,
therefore, just `../rust-toolchain` does the job.

Co-authored-by: B. Petersen <r10s@b44t.com>
link2xt 2 tahun lalu
induk
melakukan
01c1d29b01
3 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 1 1
      DcCore/DcCore.xcodeproj/project.pbxproj
  2. 1 1
      README.md
  3. 1 0
      rust-toolchain

+ 1 - 1
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 */
 

+ 1 - 1
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).

+ 1 - 0
rust-toolchain

@@ -0,0 +1 @@
+1.64.0