Skip to content

feat(dev): Blaze live reload for native GPUI apps (experimental) - #53

Draft
1bye wants to merge 14 commits into
mainfrom
codex/blaze-live-rust-supervisor
Draft

1bye wants to merge 14 commits into
mainfrom
codex/blaze-live-rust-supervisor

Conversation

@1bye

@1bye 1bye commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Adds experimental native hot reload through rake dev --live. The Rust supervisor
drives the Blaze daemon; Rake polls on a 16 ms UI timer, redraws applied patches,
and uses checkpointed restarts when layouts change or the patch area fills.
Plain rake dev stays on Cargo. Native restarts proceed by default with a notice
for missing state; --require-state keeps the old process when state is unavailable.

Run it

rake new hello
cd hello
rake dev --live

Apple Silicon macOS only. Live mode downloads and verifies the pinned
1bye/blaze v0.20261030.1-rake.1 bundle; no global Blaze install is needed.
The generated manifest exposes live, devtools and gpui-fast aliases so a
fresh Cargo lock includes optional dependencies and compatible Taffy versions.
Only live/devtools are enabled for the live build; the alternate backend stays off.
For local review, use rake new hello --rake-path /path/to/rake/crates/rake.

The pinned fork bundle carries these engine fixes:

  • WASI realpath within the macro package sandbox.
  • Cross-file span_join returns None.
  • blaze.std:: symbol prefix and standard-library cache-key bump.
  • module_path! expansion in symbol attributes.
  • Canonical CARGO path in macro sandboxes.
  • Real rustc for build-script probes.
  • Missing AArch64 NEON intrinsic lowering.

The fixed matching macro server is bundled. Hybrid native-macro settings, the
64 MiB stack, pf-no-simd through rake/live, and binary-only builds are automatic.

Measurements

Clean install from the GitHub release, app behind the editor, medians of six trials:

Edit Save → apply Save → redraw
view! text 0.885 s 1.063 s
Helper 0.438 s 0.675 s
  • App trial: all 13 examples were run, plus a scratch app using 13 common crates (image, tokio, reqwest, bundled rusqlite, sha2, regex and others).
    • 12 build and 11 start, with zero Blaze refusals.
    • The scratch app's outputs exactly match Cargo's.
    • Text edits take 0.6–0.9 s in small apps and 2–3.6 s in larger ones; helper edits take 0.3–0.9 s.
  • Restarts: a field change restarts in 3.6–5.8 s.
  • Cold build: 2–4 minutes.
  • Idle CPU: 0.07% of one core.

Limits

  • Only registered checkpoints are restored; other fields reset with a notice.
  • Older/custom apps may need the feature aliases documented in docs/development.md.
    The pinned engine can plan inactive dependencies absent from Cargo's lockfile.
  • Larger macro bodies can still take seconds to reload. Edited static initializers reset.
  • One earlier router remount at edit 30 remains unexplained; later soaks did not reproduce it.
  • First full restarts can be slow (55 s in an earlier larger fixture).
  • gpu-surface --features fast panics at startup: Blaze links the window classes of both GPUI backends. inspector fails under Cargo too, because of its manifest.
  • Live mode runs the bare executable without app bundle resources, so foundation reports its update status differently from Cargo.
  • With --require-state, a blocked app keeps getting Restart, even after the field is reverted. Restart it yourself.
  • Linux and Intel Mac live mode are not supported. CI tests use fake engines; no
    real Blaze build is required in CI.

Validation

  • Rebased onto current main 8ba48c2c; frame polling is folded into the UI-timer fix.
  • 998 workspace tests; 6 live-runtime tests; 15 supervisor tests;
    4 installer tests, including wrong checksums and tampering.
  • CI-style fmt, workspace Clippy, live-feature Clippy and spacing checks.
  • Fresh generated app: live text/helper edits, field restart with a visible notice,
    patch after restart, and plain Cargo dev.
  • Published-bundle View/Notes smoke edits; unseeded scaffold builds natively and for Wasm.

Details: .agents/reports/pr53-mergeable.md.

🤖 Generated with Claude Code

@1bye
1bye force-pushed the codex/blaze-live-rust-supervisor branch 2 times, most recently from 8ce5f78 to bde4d5e Compare November 12, 2026 17:33
1bye added 14 commits November 12, 2026 20:01
Verify and install the versioned Rake bundle instead of depending on a PATH compiler or patched global toolchain. Enter the exact engine directly, select the packaged native macro server, and keep daemon edits on the same private socket. Cargo remains the default.
Record the local archive hash, cold-install live checks, provenance limit, and owner-only public release steps. No repository, push or release is performed.
Use the bundle rebuilt on upstream v0.20261030.1. Record paired
six-trial timings and isolate offline doctor tests from real installs.
Verify the real download without an archive override. Record six-trial
text/helper timings, readiness and checksum rejection.
Block uncheckpointed root restarts after observed unsaved-data loss.
Consume failed restart requests and already-seen apply sequences so errors
remain visible without retry loops.

Document the published bundle's app matrix and remaining exclusions.
Default to partial checkpoint restoration and report reset entries. Replace --restart-without-state with --require-state (or RAKE_REQUIRE_STATE=1) for the previous blocking policy.

Keep permanent-failure consumption and Busy-only retries. Check strict state before relinking. Document the pinned engine type-change latch and checkpoint-only restoration limits.
Expose facade features so fresh Cargo locks include the live runtime,
profiler and compatible GPUI backends. Test without a seeded lockfile.

Keep Blaze metadata Unix-only and use main’s native IPC client after
removal of the Python supervisor.
Apply machine-safe blank-line fixes to the live integration. Verify
identical Rust token streams for all 13 changed files.
@1bye
1bye force-pushed the codex/blaze-live-rust-supervisor branch from bde4d5e to 838efd8 Compare November 12, 2026 20:14
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