Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,25 @@ jobs:
echo "SCCACHE_DIR=$HOME/.cache/sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV

- name: Create cargo config for 16KB page size support
run: |
# Android 15+ requires 16KB page size alignment for native libraries
# https://developer.android.com/guide/practices/page-sizes
mkdir -p frontend/src-tauri/.cargo
cat > frontend/src-tauri/.cargo/config.toml << 'EOF'
[target.aarch64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.armv7-linux-androideabi]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.i686-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
EOF

- name: Build Rust library (${{ matrix.rust_target }})
run: |
export NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,25 @@ jobs:
echo "SCCACHE_DIR=$HOME/.cache/sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV

- name: Create cargo config for 16KB page size support
run: |
# Android 15+ requires 16KB page size alignment for native libraries
# https://developer.android.com/guide/practices/page-sizes
mkdir -p frontend/src-tauri/.cargo
cat > frontend/src-tauri/.cargo/config.toml << 'EOF'
[target.aarch64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.armv7-linux-androideabi]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.i686-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
EOF
Comment on lines +287 to +304
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Same indentation issue as in android-build.yml.

The TOML content has leading whitespace that will be written to the file. Apply the same fix as suggested for android-build.yml to ensure TOML parses correctly.

🔧 Proposed fix: Remove leading indentation from TOML content
       - name: Create cargo config for 16KB page size support
         run: |
           # Android 15+ requires 16KB page size alignment for native libraries
           # https://developer.android.com/guide/practices/page-sizes
           mkdir -p frontend/src-tauri/.cargo
           cat > frontend/src-tauri/.cargo/config.toml << 'EOF'
-          [target.aarch64-linux-android]
-          rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
-
-          [target.armv7-linux-androideabi]
-          rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
-
-          [target.i686-linux-android]
-          rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
-
-          [target.x86_64-linux-android]
-          rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
+[target.aarch64-linux-android]
+rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
+
+[target.armv7-linux-androideabi]
+rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
+
+[target.i686-linux-android]
+rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
+
+[target.x86_64-linux-android]
+rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
           EOF
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Create cargo config for 16KB page size support
run: |
# Android 15+ requires 16KB page size alignment for native libraries
# https://developer.android.com/guide/practices/page-sizes
mkdir -p frontend/src-tauri/.cargo
cat > frontend/src-tauri/.cargo/config.toml << 'EOF'
[target.aarch64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.armv7-linux-androideabi]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.i686-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
EOF
- name: Create cargo config for 16KB page size support
run: |
# Android 15+ requires 16KB page size alignment for native libraries
# https://developer.android.com/guide/practices/page-sizes
mkdir -p frontend/src-tauri/.cargo
cat > frontend/src-tauri/.cargo/config.toml << 'EOF'
[target.aarch64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.armv7-linux-androideabi]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.i686-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
EOF
🤖 Prompt for AI Agents
In @.github/workflows/release.yml around lines 287 - 304, The TOML heredoc
written in the "Create cargo config for 16KB page size support" run step
contains leading indentation which will be included in
frontend/src-tauri/.cargo/config.toml and break TOML parsing; remove the leading
spaces so the heredoc content is left-aligned (no indentation) under the run
block, ensuring the [target.*] sections (e.g., [target.aarch64-linux-android],
[target.armv7-linux-androideabi], [target.i686-linux-android],
[target.x86_64-linux-android]) and their rustflags lines start at column 1 when
written to the file.


- name: Build Rust library (${{ matrix.rust_target }})
run: |
export NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
Expand Down
Loading