feat(linux-arm): add ARM Linux build support and GTK init fix#840
feat(linux-arm): add ARM Linux build support and GTK init fix#840senamakel merged 6 commits intotinyhumansai:mainfrom
Conversation
- Document aarch64 build process in BUILDING.md - Add gtk::init() in tauri-runtime-cef before tray creation - This fixes 'GTK has not been initialized' panic on ARM Linux
- Add aarch64 build and run instructions to BUILDING.md - Add gtk::init() before tray creation in tauri-runtime-cef - Fixes 'GTK has not been initialized' panic on ARM Linux
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis pull request migrates the repository's package manager from yarn to pnpm and establishes pnpm workspace configuration. Changes include pinning pnpm@10.10.0 at the root, creating a workspace config file, updating all workspace-related scripts to use pnpm syntax, extending Tauri's Debian bundling configuration, and documenting ARM Linux (aarch64) build procedures with runtime environment setup. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/BUILDING.md (1)
121-123: Use a version-agnostic.debinstall command.Pinning
OpenHuman_0.52.28_arm64.debwill go stale quickly and causes avoidable doc drift.Suggested doc fix
-sudo dpkg -i app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_0.52.28_arm64.deb +sudo dpkg -i app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_*_arm64.deb OpenHuman🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/BUILDING.md` around lines 121 - 123, Replace the hard-coded package name in the install step (sudo dpkg -i OpenHuman_0.52.28_arm64.deb) with a version-agnostic pattern so docs don’t go stale; update the command to reference the generated .deb via a glob (e.g. sudo dpkg -i app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_*.deb) or recommend apt install ./OpenHuman_*.deb to handle current builds, ensuring the README line that mentions OpenHuman_0.52.28_arm64.deb is replaced with this pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/src-tauri/vendor/tauri-cef`:
- Line 1: The pinned submodule commit 4fc849cc6577835aa13dca17ae14778f02912b18
for the tauri-cef submodule is unreachable in the remote; verify the commit
exists in the submodule remote and update the gitlink to a reachable commit if
not. Fix by checking the submodule remote (fetch and list refs), find the
correct reachable commit or tag to use, update the submodule reference in the
parent repo to that commit (or update .gitmodules/remote URL if it points to the
wrong remote), commit the updated gitlink, and run git submodule
sync/init/update so clones will succeed; ensure the commit hash in the parent
repo matches the verified remote commit before merging.
In `@docs/BUILDING.md`:
- Around line 105-115: The instructions hardcode the changing cef-dll-sys-<hash>
directory; update BUILDING.md so CEF_DIR is resolved dynamically (e.g., use a
glob like cef-dll-sys-*/out/cef_linux_aarch64 or a find command) instead of the
literal hash, and show the wrapper example using that dynamic resolution; ensure
the examples still set REL_DIR and LD_LIBRARY_PATH and exec the OpenHuman binary
so the script uses the discovered CEF_DIR rather than a brittle hardcoded path.
- Around line 94-97: The ARM build section uses `pnpm tauri build` which is
inconsistent with the repo's Yarn tooling and will fail; update that command to
use `yarn tauri build` (or instruct to run `cargo tauri build` directly) and
follow the macOS pattern by prepending the ensure step so the Tauri CLI and CEF
paths are set: use `yarn tauri:ensure && export
CEF_PATH="$HOME/Library/Caches/tauri-cef" && yarn tauri build` (or similarly
`... && cargo tauri build`) so `yarn tauri:ensure`, `CEF_PATH`, and the `tauri
build` invocation are used instead of `pnpm`.
---
Nitpick comments:
In `@docs/BUILDING.md`:
- Around line 121-123: Replace the hard-coded package name in the install step
(sudo dpkg -i OpenHuman_0.52.28_arm64.deb) with a version-agnostic pattern so
docs don’t go stale; update the command to reference the generated .deb via a
glob (e.g. sudo dpkg -i
app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_*.deb)
or recommend apt install ./OpenHuman_*.deb to handle current builds, ensuring
the README line that mentions OpenHuman_0.52.28_arm64.deb is replaced with this
pattern.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 91816820-0f0b-4630-ae0e-5338b2dd8ba8
📒 Files selected for processing (2)
app/src-tauri/vendor/tauri-cefdocs/BUILDING.md
| ```bash | ||
| cd app | ||
| pnpm tauri build --target aarch64-unknown-linux-gnu | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Check package manager hints
fd -HI 'package.json$' | while read -r f; do
echo "== $f =="
jq -r '.packageManager // "no packageManager field"' "$f" 2>/dev/null || true
done
# Check whether tauri build script exists in app package.json
APP_PKG="$(fd -HI '^package.json$' app | head -n1)"
if [ -n "${APP_PKG:-}" ]; then
echo "== scripts in $APP_PKG =="
jq -r '.scripts // {}' "$APP_PKG"
echo "== search tauri build commands =="
rg -n --iglob 'package.json' 'tauri\s+build|\"tauri\"'
fiRepository: tinyhumansai/openhuman
Length of output: 4609
🏁 Script executed:
# Read the relevant section of docs/BUILDING.md
wc -l docs/BUILDING.mdRepository: tinyhumansai/openhuman
Length of output: 86
🏁 Script executed:
# Read lines around 94-97 to see full context
sed -n '80,140p' docs/BUILDING.mdRepository: tinyhumansai/openhuman
Length of output: 1725
🏁 Script executed:
# Search for any pnpm references in the entire documentation
rg -i 'pnpm' docs/ --type mdRepository: tinyhumansai/openhuman
Length of output: 134
🏁 Script executed:
# Search for any arm or aarch64 references in package.json and build scripts
rg -i 'arm|aarch64' app/package.jsonRepository: tinyhumansai/openhuman
Length of output: 48
🏁 Script executed:
# Also check if there's a linux build script
rg -i 'linux|build' app/package.json | head -20Repository: tinyhumansai/openhuman
Length of output: 1702
Change pnpm tauri build to yarn tauri build (or invoke cargo tauri build directly).
The ARM build instructions use pnpm, but the entire repository uses Yarn (see all scripts in app/package.json). pnpm is not configured anywhere. This breaks copy-paste onboarding.
Additionally, follow the pattern from macOS build scripts: prepend yarn tauri:ensure && export CEF_PATH="$HOME/Library/Caches/tauri-cef" && to ensure the Tauri CLI and CEF paths are properly set up for the aarch64 target.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/BUILDING.md` around lines 94 - 97, The ARM build section uses `pnpm
tauri build` which is inconsistent with the repo's Yarn tooling and will fail;
update that command to use `yarn tauri build` (or instruct to run `cargo tauri
build` directly) and follow the macOS pattern by prepending the ensure step so
the Tauri CLI and CEF paths are set: use `yarn tauri:ensure && export
CEF_PATH="$HOME/Library/Caches/tauri-cef" && yarn tauri build` (or similarly
`... && cargo tauri build`) so `yarn tauri:ensure`, `CEF_PATH`, and the `tauri
build` invocation are used instead of `pnpm`.
|
could you make a PR for the CEF commit over at https://github.com/tinyhumansai/tauri-cef/pulls ? can't find the commit id 4fc849cc6577835aa13dca17ae14778f02912b18 |
…e externalBin - Migrate package.json scripts from yarn to pnpm - Add linux deb bundle config with empty depends in tauri.conf.json - Remove duplicate externalBin key in tauri.conf.json - Add pnpm workspace and lockfiles Amp-Thread-ID: https://ampcode.com/threads/T-019dbb86-6270-709c-ba2e-0dc4ed254adc Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
app/package.json (2)
48-49:⚠️ Potential issue | 🟠 Major
format/format:checkstill invokeyarn rust:format.Same migration gap — replace with
pnpmto keep tooling consistent and avoid requiring yarn on contributor machines and CI.🔧 Proposed fix
- "format": "prettier --write . && yarn rust:format", - "format:check": "prettier --check . && yarn rust:format:check", + "format": "prettier --write . && pnpm rust:format", + "format:check": "prettier --check . && pnpm rust:format:check",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/package.json` around lines 48 - 49, The package.json scripts "format" and "format:check" call "yarn rust:format" and "yarn rust:format:check" which forces yarn; update those scripts to use "pnpm rust:format" and "pnpm rust:format:check" respectively so formatting uses pnpm consistently across contributors/CI (edit the "format" and "format:check" script entries to replace the yarn invocations with pnpm).
40-43:⚠️ Potential issue | 🟠 MajorE2E composite scripts still use
yarn.
test:e2e,test:e2e:all, andtest:allchain sub-scripts viayarn, inconsistent with the rest of the migration. These will break CI/dev flows that rely on the pnpm toolchain pinned bypackageManager.🔧 Proposed fix
- "test:e2e": "yarn test:e2e:build && yarn test:e2e:login && yarn test:e2e:auth", + "test:e2e": "pnpm test:e2e:build && pnpm test:e2e:login && pnpm test:e2e:auth", "test:e2e:all:flows": "bash ./scripts/e2e-run-all-flows.sh", - "test:e2e:all": "yarn test:e2e:build && yarn test:e2e:all:flows", - "test:all": "yarn test:coverage && yarn test:rust && yarn test:e2e", + "test:e2e:all": "pnpm test:e2e:build && pnpm test:e2e:all:flows", + "test:all": "pnpm test:coverage && pnpm test:rust && pnpm test:e2e",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/package.json` around lines 40 - 43, The listed NPM scripts still call yarn (test:e2e, test:e2e:all, test:all), which is inconsistent with the pnpm packageManager; update those scripts to invoke pnpm instead of yarn (e.g., use "pnpm run <script>" or "pnpm -w run <script>" as appropriate) so that chaining (test:e2e -> test:e2e:build, test:e2e:login, test:e2e:auth; test:e2e:all -> test:e2e:build && test:e2e:all:flows; test:all -> test:coverage && test:rust && test:e2e) uses pnpm and not yarn, ensuring CI/dev flows rely on the pinned pnpm toolchain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/package.json`:
- Line 26: The macos:dev script in package.json still uses "yarn
macos:build:debug" which breaks environments pinned to pnpm; update the
macos:dev script to invoke the pnpm equivalent (e.g., "pnpm macos:build:debug")
so it uses the repository's pinned package manager; edit the "macos:dev" entry
in package.json to replace the yarn invocation with pnpm and keep the rest of
the command (opening the built app) unchanged.
---
Outside diff comments:
In `@app/package.json`:
- Around line 48-49: The package.json scripts "format" and "format:check" call
"yarn rust:format" and "yarn rust:format:check" which forces yarn; update those
scripts to use "pnpm rust:format" and "pnpm rust:format:check" respectively so
formatting uses pnpm consistently across contributors/CI (edit the "format" and
"format:check" script entries to replace the yarn invocations with pnpm).
- Around line 40-43: The listed NPM scripts still call yarn (test:e2e,
test:e2e:all, test:all), which is inconsistent with the pnpm packageManager;
update those scripts to invoke pnpm instead of yarn (e.g., use "pnpm run
<script>" or "pnpm -w run <script>" as appropriate) so that chaining (test:e2e
-> test:e2e:build, test:e2e:login, test:e2e:auth; test:e2e:all -> test:e2e:build
&& test:e2e:all:flows; test:all -> test:coverage && test:rust && test:e2e) uses
pnpm and not yarn, ensuring CI/dev flows rely on the pinned pnpm toolchain.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c006deee-0200-4262-89fd-043be5a95ce2
⛔ Files ignored due to path filters (2)
app/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
app/package.jsonapp/src-tauri/tauri.conf.jsonpackage.jsonpnpm-workspace.yaml
✅ Files skipped from review due to trivial changes (2)
- pnpm-workspace.yaml
- app/src-tauri/tauri.conf.json
|
The CEF fix has been submitted as a separate PR: tinyhumansai/tauri-cef#8 This PR updates the submodule reference to include the GTK initialization fix in the tauri-cef vendor submodule. |
The commit 4fc849cc is not yet available in the remote. Using the latest available commit c8ece7c78 from origin/feat/cef. The GTK init fix is available via separate PR: tinyhumansai/tauri-cef#8
|
All issues have been addressed in subsequent commits:
The GTK fix is available via separate PR: tinyhumansai/tauri-cef#8 |
|
Amazing! Welcome to the contributors club! merging shortly. |
| "name": "openhuman-repo", | ||
| "private": true, | ||
| "packageManager": "pnpm@10.10.0", | ||
| "workspaces": [ |
There was a problem hiding this comment.
Deferring pnpm migration to a follow-up PR — it requires substantial refactoring (lockfile, CI, scripts, Husky, Tauri sidecar staging). Keeping this PR on yarn for now. The ARM Linux build docs and GTK fix are the core contribution here. A dedicated pnpm migration PR can follow with all the necessary CI and lockfile changes.
Resolved conflicts: - package.json: keep main's pinned pnpm SHA (workspaces now defined in pnpm-workspace.yaml) - app/src-tauri/tauri.conf.json: keep main's explicit deb depends list - docs/BUILDING.md: keep main's version-agnostic run/install snippets - pnpm-lock.yaml, app/pnpm-lock.yaml: take main's lockfiles
Summary
Problem
ARM Linux builds (aarch64) fail at startup with GTK has not been initialized error
Solution
Added gtk::init().ok() in vendor/tauri-cef/crates/tauri-runtime-cef/src/lib.rs after CEF initialization
Summary by CodeRabbit
Release Notes
Documentation
Chores