Skip to content

Conversation

@aaronvg
Copy link
Contributor

@aaronvg aaronvg commented Oct 25, 2025

Note

Introduces a Bacon-driven WASM rebuild + custom Vite HMR pipeline with error overlay, local WASM copying, and config/docs to enable fast Rust/WASM development in the Playground.

  • Docs:
    • Add docs/hot-reload.md detailing architecture and setup for Rust/WASM hot-reload.
  • WASM build/watch tooling:
    • Add engine/baml-schema-wasm/bacon.toml with watch-wasm-dev job.
    • Add engine/baml-schema-wasm/watch-build.py to serialize builds, write .wasm-build-status, and stream output.
    • Update .gitignore for temp build files; add wasm-bindgen-cli to mise.toml.
  • Playground (Vite):
    • New plugin typescript/apps/playground/plugins/vite-plugin-wasm-hmr.ts watching .wasm-build-status, sending HMR status/error overlays, and optionally copying built WASM locally.
    • Update vite.config.ts to use wasmHmr, alias @gloo-ai/baml-schema-wasm-web to a local dist, copy WASM assets, tweak dev server headers/watch.
  • Playground common (frontend):
    • Add HMR wiring in atoms.ts (reload trigger scaffold) and keep WASM init; add global panic bridge wiring (UI can react to WASM panics).
  • Misc:
    • Minor log message tweaks in runtime_wasm/mod.rs and publisher; small UI/layout tweaks in fiddle app; commit diagnostic sample file under web/.bacon-diagnostics.

Written by Cursor Bugbot for commit b980167. This will update automatically on new commits. Configure here.

@aaronvg aaronvg temporarily deployed to boundary-tools-dev October 25, 2025 22:59 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev October 25, 2025 22:59 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev October 25, 2025 22:59 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Oct 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
promptfiddle Ready Ready Preview Comment Oct 26, 2025 0:00am

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link

Copy link

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

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.

ℹ️ 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".

Comment on lines +31 to +33
// Watch the bacon diagnostics file
diagnosticsWatcher = watch(diagnosticsFile, async (eventType) => {
if (eventType !== 'change') return;

Choose a reason for hiding this comment

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

P1 Badge Guard file watcher when diagnostics file is absent

The plugin calls fs.watch(diagnosticsFile, …) unconditionally. fs.watch throws ENOENT if the path does not yet exist, which is the normal state when a developer starts Vite before running watch-build.py the first time. In that situation the dev server will crash during startup and HMR never initialises. Creating the file if missing or watching its parent directory avoids the failure.

Useful? React with 👍 / 👎.

@github-actions
Copy link

…st wasm bundle, but it still goes blank when eventlistener rerenders
@aaronvg aaronvg temporarily deployed to boundary-tools-dev October 25, 2025 23:43 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev October 25, 2025 23:43 — with GitHub Actions Inactive
@aaronvg aaronvg temporarily deployed to boundary-tools-dev October 25, 2025 23:43 — with GitHub Actions Inactive
@github-actions
Copy link

@github-actions
Copy link

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.

2 participants