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.13-py3-none-win_arm64.whl (11.1 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.28+ x86-64

fastled-2.0.13-py3-none-manylinux_2_28_aarch64.whl (20.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

fastled-2.0.13-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.13-py3-none-win_arm64.whl.

File metadata

  • Download URL: fastled-2.0.13-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.13-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 0deb8c4652553cb62656f94b341951d2df35e01b5bccbf1cf8f6a73badc88f38
MD5 7ad262e8c238dc7b5d31803b8aae1cd2
BLAKE2b-256 56ba42e7b88d75c248f1c2525e5a2fb3a3c0b3038b1e0135678846f21fcb5b27

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.13-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.13-py3-none-win_amd64.whl.

File metadata

  • Download URL: fastled-2.0.13-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.13-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 555519be1144c47a74c52260e8e84613673f53bd25a2bf277c14d48ddb70172c
MD5 acb66ade5d3b0bedf27b56504869a7a4
BLAKE2b-256 da7bbe0ccc509ab5830721b07b9e7def0a737366f00e2a77a1a9882c35ae8e00

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.13-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.13-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fastled-2.0.13-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0ebb477d4cba82727ef4435c3a66f75af663609d3360c0c766f6692519a84792
MD5 038a48a18d62bf4c6b442b5266852fce
BLAKE2b-256 365693016249112af606a807a002ed2f19a558e8680f6b9a51f42d2999371b4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.13-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.13-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fastled-2.0.13-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1f8ca7921eaef3e91cc7b5566d46eba69b753e918dbf347e4441c2cf126ae0e8
MD5 d31a1dce0b8066ade39d91bcb90b56ae
BLAKE2b-256 cbeb1c64b24052bf7401e1adee81ab36d15c90fd34e951d27fe2af26c4babb29

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.13-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.13-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastled-2.0.13-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 562629d955f079715c9fa92524d50cd2ac981b9c5a581ab10e9bd31aed6aae6f
MD5 e7a6d77bd6eee9c70a30cdda8a6f6f51
BLAKE2b-256 e7faff41d0292f1889fb76e4a2d33318ebd03364ebc0fee9bea25f3a825cce39

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.13-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.13-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastled-2.0.13-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d2c3d1a3492f8d798c0fa3126e25f6e447cddc09c3365c528646caead5d0205a
MD5 7f2cc217ec4b95d2b0f63cd5e7b93c70
BLAKE2b-256 b686be67f5d12d97b3195221dc50bb4925bdb844f351f831da321d94107151d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastled-2.0.13-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