Skip to main content

FastLED Wasm Compiler

Project description

FastLED WASM Compiler

Build Lint Unit Test Integration Test
Linux x86 Linux x86 Build Linux x86 Lint Linux x86 Unit Test Linux x86 Integration Test
Linux ARM Linux ARM Build Linux ARM Lint Linux ARM Unit Test Linux ARM Integration Test
Windows x86 Windows x86 Build Windows x86 Lint Windows x86 Unit Test Windows x86 Integration Test
Windows ARM Windows ARM Build Windows ARM Lint Windows ARM Unit Test Windows ARM Integration Test
macOS x86 macOS x86 Build macOS x86 Lint macOS x86 Unit Test macOS x86 Integration Test
macOS ARM macOS ARM Build macOS ARM Lint macOS ARM Unit Test macOS ARM Integration Test

Publish Release

Compile your FastLED sketch and run it on the browser!

image

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 fastled and run with fastled mysketchfolder.

https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218

Install

pip install fastled

Alternative installers:

  • uv pip install fastled --system
  • pipx 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
--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.

Features

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 files.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.

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fastled-2.0.11-py3-none-win_arm64.whl (11.1 MB view details)

Uploaded Python 3Windows ARM64

fastled-2.0.11-py3-none-win_amd64.whl (11.1 MB view details)

Uploaded Python 3Windows x86-64

fastled-2.0.11-py3-none-manylinux_2_28_x86_64.whl (20.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

fastled-2.0.11-py3-none-manylinux_2_28_aarch64.whl (21.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

fastled-2.0.11-py3-none-macosx_11_0_arm64.whl (11.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

fastled-2.0.11-py3-none-macosx_10_12_x86_64.whl (11.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file fastled-2.0.11-py3-none-win_arm64.whl.

File metadata

  • Download URL: fastled-2.0.11-py3-none-win_arm64.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastled-2.0.11-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 38a4b24354877a334ddfe8a73dd01d2d737a6d04a0c06949f555f85c660ef1c8
MD5 9594205b8c4c9f61f4c9589d2454f0df
BLAKE2b-256 bb9233aaced63ceb1708af077f265dee75531b96e80dc9752ab6586b5fa92f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.11-py3-none-win_arm64.whl:

Publisher: auto-release.yml on zackees/fastled-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastled-2.0.11-py3-none-win_amd64.whl.

File metadata

  • Download URL: fastled-2.0.11-py3-none-win_amd64.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastled-2.0.11-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c2126a836a517184c991122e9f2bbd6aa64eb0765ccb0942d259cfec35b7445d
MD5 e15938f686ee258616fe430305e9bac6
BLAKE2b-256 d2c6c4ad4e6cc4a114623fdb633bd8c302951c6ef67361fae2782493341dd35d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.11-py3-none-win_amd64.whl:

Publisher: auto-release.yml on zackees/fastled-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastled-2.0.11-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fastled-2.0.11-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ec8657a8e63d8df68412e15df8ee881f978bb883989d9185c2b9d2a5742cf777
MD5 b867e374b962a4e01540dd8a589c5fbf
BLAKE2b-256 52f7f65b148cf8e2c30eeb49ce8bba24f73ec2f742b3bebe6fcb43a2c913215e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.11-py3-none-manylinux_2_28_x86_64.whl:

Publisher: auto-release.yml on zackees/fastled-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastled-2.0.11-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fastled-2.0.11-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b4e6bf00a400e0abe88a3c7a52df50fb5fa8e754fb5fbc99cd02542371efcfc4
MD5 64c65c5cc34c2eb12ac645e508f5abc6
BLAKE2b-256 b176d81d91115dc2576e9e58d65c0c4d0cc17fe3cbee51279ed18aa869b3b4e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.11-py3-none-manylinux_2_28_aarch64.whl:

Publisher: auto-release.yml on zackees/fastled-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastled-2.0.11-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastled-2.0.11-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bcbecc078c3406a0c20d97ace1760ab36a12b0a8dfb8976897b4e1c3c79726d5
MD5 eade537e2b5673b5ef67abaecf0ac218
BLAKE2b-256 470c0b50a4d880ec2bb45ac3ed5f7ad3c24f312df854ebc819cefdfd91c2862b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.11-py3-none-macosx_11_0_arm64.whl:

Publisher: auto-release.yml on zackees/fastled-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastled-2.0.11-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastled-2.0.11-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7e4b6495e227470af75d7fdfee0ee96a10e58e2045d7e18db0763531d555d48a
MD5 3eb3918f073d13aeda63cb429ebddda6
BLAKE2b-256 8edbc9d82c8a44842fb0d126a9ff6db8e53ab4faeda8d5423686c23a3e790b9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.11-py3-none-macosx_10_12_x86_64.whl:

Publisher: auto-release.yml on zackees/fastled-wasm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page