Repository navigation
Hot reload: use cargo-gpui and gpui-mobile's GpuiLibraryLoader - #70
Conversation
The hot-reload code moves out of the lab, split by what it relates to: - cargo gpui, unpatch, gpui-hot and gpui-hot-macros go to the standalone repo Bombatomica64/cargo-gpui (MIT OR Apache-2.0), unchanged. The lab depends on gpui-hot by git rev. - Loading a pushed debug library is gpui-mobile's GpuiLibraryLoader (fork branch dev-hot-loader, merged into the fork's main; the lab's pin moves to it). build.sh copies it with the other helpers, and LabActivity calls it instead of its own loadLibrary(). Same behaviour. Docs: the gpui-mobile skill, MOBILE_PATCHES, CONTRIBUTING_IDEAS item 4 and the plan point at the new homes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d99471b099
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| super.onCreate(state); | ||
| loadLibrary(); | ||
| // Debuggable builds prefer a library pushed by `cargo gpui reload`. | ||
| GpuiLibraryLoader.load(this, "gpui_mobile_lab"); |
There was a problem hiding this comment.
Generate the loader before running
cargo gpui apk
On a clean checkout, the documented cargo gpui apk setup now fails during Java compilation because LabActivity directly references GpuiLibraryLoader, while that class is created only by build.sh; the apk command builds the Rust library and invokes Gradle directly, and android/app/build/generated is ignored and initially absent. Generate/copy the helper in the apk path as well, or keep the loader in a source location available to every Gradle invocation.
Useful? React with 👍 / 👎.
This moves the hot-reload code out of the lab, split by what each part relates to. No behaviour changes.
cargo gpui,unpatch,gpui-hotandgpui-hot-macros, unchanged apart from the paths. The Dioxus credits andLICENSE-MIT-dioxusmove with them. The lab now depends ongpui-hotby git rev (538678d).GpuiLibraryLoader, which loadsfiles/dev/lib<name>.soin debuggable builds and the packaged library otherwise. It was added in android: GpuiLibraryLoader, a library loader for host-driven Activities gpui-mobile#12 (branchdev-hot-loader, off longbridgemain) and merged into the fork'smain; the lab's gpui-mobile pin moves to that merge (c456356, which adds only this change).build.shcopies the helper like the other ones, andLabActivitycalls it instead of its ownloadLibrary().The local debug APK built with
cargo gpui apkfrom the new repo. The phone run is reported below.🤖 Generated with Claude Code