FastLED Wasm Compiler
Project description
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 |
--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 |
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastled-2.0.9-py3-none-win_arm64.whl.
File metadata
- Download URL: fastled-2.0.9-py3-none-win_arm64.whl
- Upload date:
- Size: 10.6 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78a764e96e95005537c2b563f1f0d282f1330da62e7b42ff1c2a876a294ad846
|
|
| MD5 |
23834246a4140eff5c3eeacd2f6f6c31
|
|
| BLAKE2b-256 |
c8fe053da276264b6219efbd0fe6384f139334d5df5632fb99aa1ab5b15565d4
|
Provenance
The following attestation bundles were made for fastled-2.0.9-py3-none-win_arm64.whl:
Publisher:
auto-release.yml on zackees/fastled-wasm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastled-2.0.9-py3-none-win_arm64.whl -
Subject digest:
78a764e96e95005537c2b563f1f0d282f1330da62e7b42ff1c2a876a294ad846 - Sigstore transparency entry: 1546847061
- Sigstore integration time:
-
Permalink:
zackees/fastled-wasm@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zackees
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
auto-release.yml@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastled-2.0.9-py3-none-win_amd64.whl.
File metadata
- Download URL: fastled-2.0.9-py3-none-win_amd64.whl
- Upload date:
- Size: 10.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f5f44696e1d1a1c30c3ac3f326dc49b5139c26b93d0c350b7b3e97801659a2f
|
|
| MD5 |
ecc57f0a75a04e86a68b9bcbfcd3769e
|
|
| BLAKE2b-256 |
d8ef757fae9e887b17f833fb335c773aa1b4ecc7c155e8092a8c45dc41652162
|
Provenance
The following attestation bundles were made for fastled-2.0.9-py3-none-win_amd64.whl:
Publisher:
auto-release.yml on zackees/fastled-wasm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastled-2.0.9-py3-none-win_amd64.whl -
Subject digest:
0f5f44696e1d1a1c30c3ac3f326dc49b5139c26b93d0c350b7b3e97801659a2f - Sigstore transparency entry: 1546847043
- Sigstore integration time:
-
Permalink:
zackees/fastled-wasm@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zackees
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
auto-release.yml@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastled-2.0.9-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: fastled-2.0.9-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 20.2 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae277ce3e6ec7090586a331109378b461c178da5f608ff992ec63277cd3c3d30
|
|
| MD5 |
41c6ca60d8cf1648830a72f9e9d8b543
|
|
| BLAKE2b-256 |
a0dceea14f6132fafb1054e5dac4070d73bce987a740d635211f44b9f9d270b7
|
Provenance
The following attestation bundles were made for fastled-2.0.9-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
auto-release.yml on zackees/fastled-wasm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastled-2.0.9-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
ae277ce3e6ec7090586a331109378b461c178da5f608ff992ec63277cd3c3d30 - Sigstore transparency entry: 1546847035
- Sigstore integration time:
-
Permalink:
zackees/fastled-wasm@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zackees
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
auto-release.yml@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastled-2.0.9-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: fastled-2.0.9-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 20.7 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b65521599e278b3378dcd67a5baec9d15c70a54787a127236058e4568afa87b
|
|
| MD5 |
e08fc10f0418f8403b48ec1cec811597
|
|
| BLAKE2b-256 |
ee8692838f0d62c9fd396a013720106ed2a049c7e786efdbbc2a17c3173f001a
|
Provenance
The following attestation bundles were made for fastled-2.0.9-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
auto-release.yml on zackees/fastled-wasm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastled-2.0.9-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
7b65521599e278b3378dcd67a5baec9d15c70a54787a127236058e4568afa87b - Sigstore transparency entry: 1546847056
- Sigstore integration time:
-
Permalink:
zackees/fastled-wasm@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zackees
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
auto-release.yml@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastled-2.0.9-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: fastled-2.0.9-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.4 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60a98c72fe87fbff71c016421b0c4bfc12b25edcab356de625f8b481cf29120d
|
|
| MD5 |
7697326ec5c64f70fc722e86a63e674a
|
|
| BLAKE2b-256 |
710d1708f0977add24c81d5bfee923f303ff7d766dac92c7ebb79d1fff00050d
|
Provenance
The following attestation bundles were made for fastled-2.0.9-py3-none-macosx_11_0_arm64.whl:
Publisher:
auto-release.yml on zackees/fastled-wasm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastled-2.0.9-py3-none-macosx_11_0_arm64.whl -
Subject digest:
60a98c72fe87fbff71c016421b0c4bfc12b25edcab356de625f8b481cf29120d - Sigstore transparency entry: 1546847050
- Sigstore integration time:
-
Permalink:
zackees/fastled-wasm@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zackees
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
auto-release.yml@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastled-2.0.9-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: fastled-2.0.9-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 11.7 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1783b315472169a1301872a913585c4f7fed627fd934b74941accc70e25fd2a9
|
|
| MD5 |
02754b7a590764995b79ab51f551fac4
|
|
| BLAKE2b-256 |
04076c640ca00fbd1dd2b20189f4c7184ed552f4e8a93742980b764399ec5a94
|
Provenance
The following attestation bundles were made for fastled-2.0.9-py3-none-macosx_10_12_x86_64.whl:
Publisher:
auto-release.yml on zackees/fastled-wasm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastled-2.0.9-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
1783b315472169a1301872a913585c4f7fed627fd934b74941accc70e25fd2a9 - Sigstore transparency entry: 1546847048
- Sigstore integration time:
-
Permalink:
zackees/fastled-wasm@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zackees
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
auto-release.yml@a31e2f310c96e075c6ca1e2bdb9240b88f8e4384 -
Trigger Event:
push
-
Statement type: