FastLED WASM Compiler
| Build | Lint | Unit Test | Integration Test | |
|---|---|---|---|---|
| Linux x86 | ||||
| Linux ARM | ||||
| Windows x86 | ||||
| Windows ARM | ||||
| macOS x86 | ||||
| macOS ARM |
Compile your FastLED sketch and run it on the browser!
Demo
https://zackees.github.io/fastled-wasm/
About
Compile FastLED sketches to browser-ready html/js/wasm output using a native Emscripten toolchain.
Compile times are extremely fast thanks to aggressive object caching and sketch fingerprinting. Recompilation of sketch files with minimal changes completes in under a second.
Tutorial Video
Note: This video predates the Rust CLI migration. Install with
pip install fastledand run withfastled mysketchfolder.
https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
Install
pip install fastled
Alternative installers:
uv pip install fastled --systempipx install fastled
Executables
Pre-built binaries are published on each GitHub release:
Ubuntu Install Script
curl -L https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/install_linux.sh | /bin/bash
Run
Change into a sketch directory and run:
fastled
Useful flags:
| Flag | Description |
|---|---|
--just-compile |
Compile and exit without opening a browser or watching files |
--no-app |
Emit the JavaScript API/WASM artifacts without the default index.js application |
| `--link <static | dynamic>` |
--debug |
Build with debug-friendly compiler settings |
--quick |
Default build mode |
--release |
Optimized build (~1/3 smaller binary) |
--fastled-path <path> |
Point the build at a local FastLED checkout |
--purge |
Clear cached FastLED downloads and stale WASM build artifacts |
--serve-dir <dir> |
Serve an existing directory without compiling |
Set FASTLED_VIEWER_LOGS=1 to forward the viewer window's browser console output (console.*, uncaught errors, failed fetches) to the terminal's stderr, prefixed with [viewer] — useful when diagnosing a blank or broken viewer.
Testing your sketch from CI or an agent
The shipped viewer can render a sketch, capture its canvas, collect browser logs, and exit without Playwright or a separate browser installation:
fastled examples/Blink --test --test-wait-secs=2 \
--test-screenshot=out/blink.png --test-log=out/blink.viewer.log \
--test-exit-on-error
For a frame sequence, add
--test-interval-secs=0.5 --test-count=10 and use a path such as
out/blink-{n:03}.png. The interval is the target between scheduled capture
starts; slow canvas readback or uploads can delay later frames. The wait begins
only after the compiled page has a canvas and two animation frames have
elapsed. Exit codes are 0 for success,
1 for compile/viewer/I/O failure, 2 for a captured page error when
--test-exit-on-error is enabled, 124 for the total timeout, and 125 for
the ready timeout. An interrupted run exits 130. The viewer and local server
are stopped automatically.
To run trusted host checks after the first rendered frame, repeat
--test-cmd options. They execute sequentially from the sketch directory,
and the test succeeds only after both the viewer schedule and all commands
finish:
fastled examples/Blink --test --test-log=out/run.log \
--test-cmd="python scripts/check_ready.py" \
--test-cmd="python scripts/check_runtime_state.py"
Commands use /bin/sh -c on Unix and %COMSPEC% /D /S /C (normally
cmd.exe) on Windows, with null stdin and no extra console window. Pipes,
redirection, &&, and quoting follow the platform shell; invoke
powershell -NoProfile -Command ... explicitly for PowerShell syntax.
Command stdout and stderr are drained and mirrored to the terminal. With
--test-log, timestamped stream markers are appended, such as
[fastled-test-cmd 0 stdout] ... and [fastled-test-cmd 0] exit=0.
Commands are trusted input and inherit the user's environment and filesystem
permissions. A spawn failure or nonzero command exit returns 1; the total
timeout (124) and interrupt (130) also terminate the active command and
its descendants.
Features
Browser Compatibility
Safari is a required production target. Release builds must not depend on Emscripten's JavaScript Promise Integration (JSPI), including -sJSPI, WebAssembly.Suspending, or WebAssembly.promising. Emscripten upgrades must preserve a non-JSPI async path and pass a real Safari smoke test before becoming the default toolchain.
Hot Reload
Once launched, the compiler remains open and watches for file changes. Edits to your sketch are automatically recompiled and the browser reloads with the updated output. Build output is streamed to the browser in real time via SSE.
Hot Reload FastLED Source
If you launch fastled inside the FastLED repo with --fastled-path, changes to the library source code are detected and trigger recompilation. Unlike sketch-only rebuilds, modifying a header file may produce a longer recompile.
Big Data in /data Directory
Large files (e.g. video) in a sketch's data/ directory are handled specially to avoid round-tripping blobs. The WASM compiler generates a sketch_assets.json manifest for an emulated SD card system mounted at /data/. Files named *.json, *.csv, *.txt are injected before setup() runs; all others are streamed asynchronously at runtime. The loader accepts legacy files.json output when running an older generated sketch.
For an example see examples/SdCard in the FastLED repo.
Compile Speed
Three compile modes are available: --quick (default), --release (optimized for size, ~1/3 smaller binary), and --debug (debug-friendly compiler settings). Aggressive object caching means incremental rebuilds are near-instant.
Arduino Compatibility
Most simple Arduino sketches compile out of the box. Common functions like digitalWrite(), Serial.println(), and others are stubbed. digitalRead() returns 0 and analogRead() returns random numbers.
HTTPS
The local preview server supports HTTPS using the bundled localhost certificate pair. HTTPS is required for browser features such as microphone access. See HTTPS_SSL.md.
Python Package
The fastled Python package is a compatibility launcher for the native Rust
CLI. Internal build, project discovery, and fuzzy matching behavior lives in
Rust and is tested there.
FAQs
Q: Why does FastLED become choppy when the browser tab is in the background? A: FastLED WASM currently runs on the main thread. Chrome throttles the event loop for background tabs. Moving to a Web Worker would solve this.
Q: Why does a long delay() freeze the browser?
A: delay() blocks loop() which blocks the main thread. A Web Worker would decouple FastLED from the browser's UI thread.
Q: How can I reduce the compiled size of my sketch?
A: A significant portion of the binary is Emscripten JS bundling overhead. The wasm_compiler_settings.py in the FastLED repo can tune this. Using --release produces a ~1/3 smaller binary than --quick.
Development
./install
./test
./lint
Release files for fastled 2.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fastled-2.0.17-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| fastled-2.0.17-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| fastled-2.0.17-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| fastled-2.0.17-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| fastled-2.0.17-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| fastled-2.0.17-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 97.9 MB
Release files / fastled-2.0.17-py3-none-win_arm64.whl
| Download URL | fastled-2.0.17-py3-none-win_arm64.whl |
|---|---|
| Size | 12.5 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
acb788cb985da63afc6088e49e97a5a0d3845bb295a3a9cb013acdc8ea689a8a
|
|
BLAKE2b-256 checksum How to use checksums |
f01dc233cae4ff28331258f37ae92bfda7ae694348aff59db39e4b4f13391e10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / fastled-2.0.17-py3-none-win_amd64.whl
| Download URL | fastled-2.0.17-py3-none-win_amd64.whl |
|---|---|
| Size | 12.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
25f8451aa7a8402b78ae41c0e34f872144f0d82c3e8faf37cacd9f694f2d6f27
|
|
BLAKE2b-256 checksum How to use checksums |
502cd8d9bf39ac4b509f66dc283b530a466712991bd4a427b4a03edc4e5a4ba5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / fastled-2.0.17-py3-none-manylinux_2_28_x86_64.whl
| Download URL | fastled-2.0.17-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
a52baf005660f023dd0a3b908bb82867929d8868a007ae73bbad90372ba79b00
|
|
BLAKE2b-256 checksum How to use checksums |
cc9ded609eb684c4016a27ba7339cfab69712d81ecab54d3a4e645bae790cf8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / fastled-2.0.17-py3-none-manylinux_2_28_aarch64.whl
| Download URL | fastled-2.0.17-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 23.5 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
9ae3578246fca129bf807e45f63f15b7528006a639702423580216ff25a0c004
|
|
BLAKE2b-256 checksum How to use checksums |
f56feba704f1bffa8cf2f5380aeb7c9ceaa6f20e00b38c5f4f44c10bed228683
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / fastled-2.0.17-py3-none-macosx_11_0_arm64.whl
| Download URL | fastled-2.0.17-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 13.1 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e9637abeb17f9fe989d881fb811629fec86378e8277f1270f18c6fc20a0f9394
|
|
BLAKE2b-256 checksum How to use checksums |
5fd6a4d34ff7aa4ab7df569585baa9f6b74105cc14bf391c368f6e4d31f94396
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / fastled-2.0.17-py3-none-macosx_10_12_x86_64.whl
| Download URL | fastled-2.0.17-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 13.1 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f74fb7a6e38caebcc0cd49ceff80b9fd94e1280226687f1fc6bdb3d99dea13c7
|
|
BLAKE2b-256 checksum How to use checksums |
2c13b87526f9360eed85633dee496ea1aac5dc4c9a613882f411f90ffcf06129
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency log