How kalo08/esp32-wasm-toolchain works
This browser-based ESP32-S3 toolchain turns Arduino C++ into flash images using WebAssembly GCC/binutils, then writes them over Web Serial. The main flow is sketch preparation, worker orchestration of compile/assemble/link, image generation, and flashing. Optional library detection and pack loading extend compilation and linking. Toolchain binaries and manifests are fetched as static assets; their implementation is not present in the source tree, so those assets are shown as an external dependency. The detailed stage flow is grounded in the worker and README; unsampled pack contents are not expanded.
Main entry points: cppworker.js Build worker · cppbuild.js Build API · ino.js INO conversion · cppfeatures.js Feature detection
Components 15
Sketch input
- INO conversion
src/ino.js - Build API
src/cppbuild.js
Browser build
- Build worker
src/cppworker.js - C++ compiler
src/cppworker.js - Assembler
src/cppworker.js - SDK linker
src/cppworker.js - Toolchain assets
Library support
- Feature detection
src/cppfeatures.js - Optional library packs
src/cppworker.js - Arduino and ESP32 libraries
Image and flashing
- ELF image builder
src/elf2image.js - Flash API
src/flash.js - esptool-js
src/flash.js
Other components
- Sketch author
- ESP32-S3 board
Connections 16
- Sketch author → INO conversion: prepares sketch
README.md - Sketch author → Build API: submits C++
README.md - INO conversion → Build API: returns C++
src/ino.js - Build API → Build worker: starts worker
src/cppbuild.js - Build worker → Feature detection: detects features
src/cppworker.js - Build worker → Toolchain assets: fetches manifests and binaries
src/cppworker.js - Build worker → C++ compiler: runs compile
src/cppworker.js - Build worker → Assembler: runs assemble
src/cppworker.js - Build worker → SDK linker: runs link
src/cppworker.js - Feature detection → Optional library packs: selects packs
src/cppworker.js - Build worker → Optional library packs: loads headers and objects
src/cppworker.js - Arduino and ESP32 libraries → Optional library packs: provided as packs
README.md - Build worker → ELF image builder: converts ELF
src/cppworker.js - Sketch author → Flash API: requests flashing
README.md - Flash API → esptool-js: writes flash images
src/flash.js - esptool-js → ESP32-S3 board: flashes over Web Serial
README.md