Skip to main content

FastLED Wasm Compiler

Project description

FastLED wasm compiler

Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.

Linting Build and Push Multi Docker Image MacOS_Tests Ubuntu_Tests Win_Tests

About

This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.

Compile times are extremely fast - I've seen as low as 5 seconds but 8-15 seconds is typical.

This works on Windows/Linux/Mac(arm/x64).

Docker is required.

https://github.com/user-attachments/assets/bde26ddd-d24d-4a78-90b6-ac05359677fa

Demo

https://zackees.github.io/fastled-wasm/

Install

pip install fastled-wasm

Note that you may need to install x86 docker emulation on Mac-m1 and later, as this is an x86 only image at the prsent.

Use

Change to the directory where the sketch lives and run

fastled-wasm

The compiler should download, compile the target and then launch a web-browser.

Hot reload by default

Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.

This style of development should be familiar to those doing web development.

Data

If you want to embed data, then do so in the data/ directory at the project root. The files will appear in the data/ director of any spawned FileSystem or SDCard.

About the compilation.

Pre-processing is done to your source files. A fake Arduino.h will be inserted into your source files that will provide shims for most of the common api points.

Revisions

  • 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
  • 1.0.6 - Removed --no-open and --watch, --watch is now assumed unless --just-compile is used.
  • 1.0.5 - Implemented --update to update the compiler image from the docker registry.
  • 1.0.4 - Implemented --watch which will watch for changes and then re-launch the compilation step.
  • 1.0.3 - Integrated live-server to launch when available.
  • 1.0.2 - Small bug with new installs.
  • 1.0.1 - Re-use is no longer the default, due to problems.
  • 1.0.0 - Initial release.

Project details


Download files

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

Source Distribution

fastled_wasm-1.0.7.tar.gz (149.3 kB view details)

Uploaded Source

Built Distribution

fastled_wasm-1.0.7-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fastled_wasm-1.0.7.tar.gz.

File metadata

  • Download URL: fastled_wasm-1.0.7.tar.gz
  • Upload date:
  • Size: 149.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for fastled_wasm-1.0.7.tar.gz
Algorithm Hash digest
SHA256 19eea761626daae3ce26a7f01ca99181f00fdcd89267611d8e4b8e467838ba83
MD5 59d1382563c6a3915f2be5b3270fb18b
BLAKE2b-256 7de6064c693c28aecd7bf7f77b1aade590c4a2aacc5f4580191441dfc28a0d06

See more details on using hashes here.

File details

Details for the file fastled_wasm-1.0.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fastled_wasm-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5480090beae80944027e817eaa373d49ff0230c9ee7cb305b0edfa27b6b51a13
MD5 802aa4e01991a8a594569112357b9cbf
BLAKE2b-256 6c552edef81c5bd0962d8c3c650a6aff68f64215a053292b1949f19ac59f007c

See more details on using hashes here.

Supported by

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