feat: add Rust linker configuration for multiple targets
This commit is contained in:
12
.github/workflows/tauri.yml
vendored
12
.github/workflows/tauri.yml
vendored
@@ -19,6 +19,8 @@ jobs:
|
||||
cache: 'npm'
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: llvm-tools-preview
|
||||
- name: Install cinny dependencies
|
||||
run: cd cinny && npm ci
|
||||
- name: Install tauri dependencies
|
||||
@@ -30,8 +32,6 @@ jobs:
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
CARGO_BUILD_JOBS: "16"
|
||||
RUSTFLAGS: "-C codegen-units=16"
|
||||
with:
|
||||
releaseId: ${{ github.event.release.upload_url }}
|
||||
- name: Get app version (windows)
|
||||
@@ -74,6 +74,8 @@ jobs:
|
||||
cache: 'npm'
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: llvm-tools-preview
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -89,8 +91,6 @@ jobs:
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
CARGO_BUILD_JOBS: "16"
|
||||
RUSTFLAGS: "-C codegen-units=16"
|
||||
with:
|
||||
releaseId: ${{ github.event.release.upload_url }}
|
||||
- name: Get app version
|
||||
@@ -141,8 +141,6 @@ jobs:
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
CARGO_BUILD_JOBS: "16"
|
||||
RUSTFLAGS: "-C codegen-units=16"
|
||||
with:
|
||||
releaseId: ${{ github.event.release.upload_url }}
|
||||
args: "--target universal-apple-darwin"
|
||||
@@ -200,8 +198,6 @@ jobs:
|
||||
env:
|
||||
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.0.11902837
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
CARGO_BUILD_JOBS: "16"
|
||||
RUSTFLAGS: "-C codegen-units=16"
|
||||
- name: Get app version
|
||||
id: vars
|
||||
run: echo "tag=$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
|
||||
|
||||
9
src-tauri/.cargo/config.toml
Normal file
9
src-tauri/.cargo/config.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
linker = "rust-lld.exe"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||
|
||||
[target.aarch64-linux-android]
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||
Reference in New Issue
Block a user