Skip to content

feat: stream live compilation output to Tauri viewer #43

Closed

Description

@zackees

Goal

When fastled --app launches the Tauri viewer, pipe the live compilation build stream into the browser window so the user sees real-time progress instead of a blank/waiting screen during compilation.

Current behavior

  1. fastled --app starts compiling
  2. Tauri viewer opens and shows "Waiting for compiled output..." or a blank page
  3. User has no visibility into build progress until compilation finishes
  4. The URL/port of the local server is not displayed in the terminal log

Desired behavior

  1. fastled --app starts compiling
  2. Tauri viewer opens immediately and shows a live build log (streaming text or a progress UI)
  3. As compilation progresses, the viewer updates in real-time (stdout/stderr from emcc, meson, esbuild)
  4. When compilation succeeds, the viewer automatically transitions to showing the compiled sketch
  5. On recompilation (watch mode), the viewer shows a brief "Recompiling..." overlay then refreshes
  6. The terminal log prints the local URL and port being used, e.g.:
    FastLED viewer running at: fastled://localhost/ (native)
    Flask server at: https://127.0.0.1:8122
    

Implementation ideas

  • Use Tauri IPC (invoke / emit) to push build log lines from Rust/Python to the webview
  • Or: have the Flask server expose a /build-status SSE (Server-Sent Events) endpoint that the frontend subscribes to
  • The frontend could show a terminal-style log panel that auto-scrolls during compilation
  • On build success, automatically load the WASM output and hide the log panel

Acceptance criteria

  • Tauri viewer shows live build output during compilation
  • Terminal log displays the URL/port being served
  • Watch mode: viewer shows recompilation progress and auto-refreshes
  • No regression: --just-compile still works without a viewer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions