Skip to content

Hot reload: use cargo-gpui and gpui-mobile's GpuiLibraryLoader - #70

Merged
Bombatomica64 merged 1 commit into
mainfrom
split-hot-reload
Oct 12, 2026
Merged

Bombatomica64 merged 1 commit into
mainfrom
split-hot-reload

Conversation

@Bombatomica64

Copy link
Copy Markdown
Owner

This moves the hot-reload code out of the lab, split by what each part relates to. No behaviour changes.

  • Standalone repo Bombatomica64/cargo-gpui (public, MIT OR Apache-2.0): cargo gpui, unpatch, gpui-hot and gpui-hot-macros, unchanged apart from the paths. The Dioxus credits and LICENSE-MIT-dioxus move with them. The lab now depends on gpui-hot by git rev (538678d).
  • gpui-mobile: GpuiLibraryLoader, which loads files/dev/lib<name>.so in debuggable builds and the packaged library otherwise. It was added in android: GpuiLibraryLoader, a library loader for host-driven Activities gpui-mobile#12 (branch dev-hot-loader, off longbridge main) and merged into the fork's main; the lab's gpui-mobile pin moves to that merge (c456356, which adds only this change). build.sh copies the helper like the other ones, and LabActivity calls it instead of its own loadLibrary().
  • Docs: the gpui-mobile skill's hot-reload page, MOBILE_PATCHES, CONTRIBUTING_IDEAS item 4 and the plan now point at the new homes.

The local debug APK built with cargo gpui apk from the new repo. The phone run is reported below.

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T13:41:12.264098Z d99471b PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@Bombatomica64
Bombatomica64 merged commit d471adf into main Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant