A VS Code extension for the FastLED WASM compiler that allows you to compile and run FastLED sketches directly in your browser.
Target-specific VSIX packages contain a verified native clangd server for
Windows x64/ARM64, Linux x64/ARM64, and macOS x64/ARM64. The universal VSIX is
intentionally offline-only: it contains no server and reports a structured
universal-package result to the extension API. No package downloads clangd,
searches PATH, or modifies dynamic-library environment variables at runtime.
To reproduce a package locally (Node 22 and uv required):
cd vscode-plugin
npm ci
python scripts/package_extension.py --target win32-x64 --out dist
python scripts/package_extension.py --target universal --out distUse FastLED: Show Bundled clangd Diagnostics to see the resolved target,
version and path, or a non-sensitive structured failure reason. Delete
resources/clangd (or run python scripts/ingest_clangd.py --clean --output resources/clangd) if an interrupted local package needs to be reset. The
artifact lock is intentionally pinned to clang-tool-chain-bins 0.4.6;
updating clangd requires changing that reviewed lock rather than resolving a
latest version.
FastLED configures one C/C++ language engine for the whole VS Code window. The extension pack installs both the LLVM clangd and Microsoft C/C++ extensions, but it deliberately never leaves both language services active for the same sketch:
auto(default) uses the native clangd bundled in a platform VSIX when the clangd VS Code extension is available; otherwise it uses Microsoft C/C++.clangd,cpptools, andoffare explicit choices in thefastled.intelliSenseEnginesetting.- FastLED: Refresh IntelliSense Configuration regenerates the
compile_commands.json,.clangd,.vscode/settings.json, and.vscode/c_cpp_properties.jsonfiles for every FastLED sketch folder.
The generated settings associate .ino files with C++, while FastLED keeps a
preprocessed live snapshot and prototype prelude current for unsaved Arduino
tabs. After opening a Blink sketch, use Go to Definition on CRGB, FastLED,
or FastLED.addLeds; the result should open the materialized FastLED headers.
Use View: Output → FastLED WASM to inspect engine selection and setup
failures.
- One-click compilation: Compile and run FastLED sketches with a single command
- Multiple build modes: Quick, Debug, and Release compilation modes
- Project initialization: Initialize new FastLED projects with example sketches
- Server management: Start and stop the FastLED compiler server
- Syntax highlighting: Full syntax highlighting for Arduino (.ino) files with FastLED-specific keywords
- Code snippets: Common FastLED patterns and boilerplate code
- Browser integration: Automatically open compiled results in your browser
- File watching: Automatic recompilation on file changes (when supported)
- FastLED WASM compiler must be installed and available in your PATH
- Docker (recommended for local compilation) or internet connection for web compiler
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "FastLED WASM"
- Click Install
- Clone this repository
- Navigate to the
vscode-plugindirectory - Run
npm install - Run
npm run compile - Press F5 to open a new Extension Development Host window
Access all commands via the Command Palette (Ctrl+Shift+P) or through the context menu:
- FastLED: Compile & Run - Compile the current sketch and open in browser
- FastLED: Compile & Run (Quick Mode) - Fast compilation with minimal optimizations
- FastLED: Compile & Run (Web Compiler) - Use the online web compiler
- FastLED: Just Compile (No Browser) - Compile without opening browser
- FastLED: Initialize New Project - Create a new FastLED project with example code
- FastLED: Open FastLED Output in Browser - Open the last compiled output
- FastLED: Start Compiler Server - Start a local FastLED compiler server
- FastLED: Stop Compiler Server - Stop the running server
- FastLED: Update Compiler - Update the FastLED compiler to the latest version
- FastLED: Purge Docker Containers - Clean up FastLED Docker containers and images
Configure the extension through VS Code Settings (File > Preferences > Settings, search for "FastLED"):
- Default Compile Mode: Choose between quick, debug, or release mode (default: quick)
- Auto Open Browser: Automatically open browser after compilation (default: true)
- Use Web Compiler: Use web compiler by default instead of local Docker (default: false)
- Web Compiler URL: URL for the web compiler (default: https://fastled.onrender.com)
- Watch Files: Enable file watching for automatic recompilation (default: true)
- Open a folder containing FastLED sketches (.ino files)
- The extension will automatically detect FastLED projects
- Use FastLED: Compile & Run to compile and view your sketch
- Open an empty folder in VS Code
- Run FastLED: Initialize New Project
- Select an example from the list
- The project will be initialized with the selected example
- Open a FastLED sketch (.ino file)
- Right-click in the editor and select FastLED: Compile & Run
- Or use the Command Palette (Ctrl+Shift+P) and search for FastLED commands
- The compiled output will open in your default browser
The extension provides comprehensive syntax highlighting for:
- Standard Arduino functions (setup, loop, pinMode, digitalWrite, etc.)
- FastLED types (CRGB, CHSV, CRGBPalette16, etc.)
- FastLED functions (addLeds, show, setBrightness, fill_solid, etc.)
- FastLED constants (WS2812B, APA102, color names, etc.)
Type these prefixes and press Tab to expand:
fastled-setup- Basic FastLED setup with common configurationfastled-clock- FastLED setup with clock pin for APA102/DotStar LEDsfill-solid- Fill all LEDs with solid colorfill-rainbow- Fill LEDs with rainbow colorsevery-n-ms- Execute code every N millisecondsfade-black- Fade all LEDs toward blackbeatsin8- 8-bit sine wave that cycles with a given BPMrandom-color- Generate a random RGB colorhsv-color- Create HSV colorpalette-color- Get color from palettefire-effect- Simple fire effectsparkle-effect- Sparkle effect with fadewave-effect- Simple wave effect
Make sure the FastLED WASM compiler is installed and available in your PATH:
npm install -g fastled
# or
pip install fastledIf you're having issues with local compilation:
- Make sure Docker is installed and running
- Try using the web compiler with FastLED: Compile & Run (Web Compiler)
- Use FastLED: Update Compiler to get the latest version
- Check the Output panel (View > Output, select "FastLED WASM")
- Ensure your sketch directory contains a valid .ino file
- Try FastLED: Update Compiler if you're using an older version
This extension is part of the FastLED WASM project.
To contribute:
- Fork the repository
- Make your changes in the
vscode-plugindirectory - Test your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.