Skip to content

meta: remote assets — hosting, build-time resolution, and on-device filesystem deployment #3986

Open

Description

@zackees

Summary

Meta issue. Tracks the full body of work for getting large binary assets out of the FastLED source tree and onto devices — remote hosting, build-time resolution, filesystem deployment, and the diagnostics that make misconfiguration legible.

Spans four repos: FastLED/FastLED, FastLED/fbuild, FastLED/assets, zackees/fastled-wasm.

Motivation

examples/Fx/FxLedmapper32x32/data/ carried ~10.2 MB of binaries (a 6.05 MB video1.rgb plus a 4.10 MB zip duplicating it). Binary blobs in git are permanent, re-downloaded on every clone, and bloat every worktree. Investigating how to remove them surfaced a chain of gaps: there was no remote-asset mechanism for example data, no filesystem-image build step, no LittleFS backend in FastLED, and two incompatible .lnk formats already in the wild.

Current state

Done. The assets are hosted in FastLED/assets with a validated manifest.json and CDN serving; video1.rgb resolves end-to-end from the CDN with sha256 verification. Not yet done: everything needed to get it onto a device without a physical SD card.

The chain

data/*.lnk
   |
   v  [fbuild lnk pull]  EXISTS - fetches + verifies into global CAS
cache (~/.fbuild/prod/cache/archives/lnk-blobs/)
   |
   v  [materializer]     EXISTS - projects into build tree
build/resources/<rel>/
   |
   +--> [embed_stage]    EXISTS - objcopy into firmware via board_build.embed_files
   |
   +--> [buildfs]        MISSING  <-- #1358
             |
             v  [uploadfs]  MISSING  <-- #1358
        device LittleFS partition
             |
             v  [FsImpl] MISSING  <-- FastLED#3984
        readable from fl::FileSystem

Tracked issues

Blocking — decide first

Issue Repo What
#1357 fbuild Normalize the .lnk format. Two incompatible variants exist today; the one file committed to FastLED (examples/AudioUrl) cannot be read by fbuild. Everything below annotates or parses .lnk, so this should settle first.

Core feature work

Issue Repo What
#1358 fbuild buildfs / uploadfs — build and flash LittleFS/SPIFFS images from data/
#3984 FastLED LittleFS FsImpl backend — without it a generated image is unreadable from fl::FileSystem
#1356 fbuild Storage-target descriptors and misconfiguration diagnostics. Audited; 3 open questions resolved, 12 corner cases resolved, 1 item needs a product decision
#1354 fbuild Original build-time resolution issue — premise partly stale, should be narrowed or closed in favor of #1358
#215 fastled-wasm Resolve remote assets into the WASM VFS so preview matches hardware

Hosting and distribution

Issue Repo What
#1 assets Structured manifest.json index plus CDN serving. Largely done — manifest live and validated, jsDelivr serving
#3974 FastLED Asset migration tracking for FxLedmapper32x32. Done — both binaries removed, hosted, resolving
#1469 zccache zccache fetch — global content-addressed cache for tool downloads. Adjacent: same CAS/integrity model, different consumer

Found along the way

Issue Repo What
#3975 FastLED WASM build cannot resolve nested examples — all of examples/Fx/* (~10 sketches) fail bash compile wasm. Patch included and verified
#3985 FastLED board_partitions documented "Reserved for future use" but 8 boards set it. Caused a real factual error during this design work
#3968 FastLED JS toolchain bootstrap costs ~143s cold and re-pays it per worktree. Adjacent: same "download once, cache globally" theme

Suggested order

  1. SK6812 is a WS2812 clone. #1357 — normalize .lnk. Everything downstream parses or annotates it.
  2. ATTiny861, ATTiny261 and ATTiny461 support #1356 — apply the audited decisions (targets live in platformio.ini, not descriptors; unconsumed-asset warning).
  3. Refresh rate appears to be more than 30 microseconds using multiple strips #1358 and feat: add a LittleFS FsImpl backend — on-chip flash storage is unreachable today #3984 in parallel — they must land together or buildfs ships pointing at an API gap.
  4. Compilation error with Arduino 1.6.5 and FastLED 3.1 #215 — WASM preview parity.
  5. bug(ci): WASM build cannot resolve nested examples (all of examples/Fx/*) #3975 is independent and cheap; it currently blocks verifying any examples/Fx/* sketch.

Key findings worth not re-deriving

  • fbuild already has the resolution pipeline. lnk/mod.rs:1-22 documents scanner -> resolver -> materializer -> downstream, and embed_stage.rs:38-46 is a working consumer. The gap is a filesystem consumer, not fetch.
  • .lnk v2 would be a breaking change. format.rs:110-116 hard-rejects v != 1; adding fields to v1 is safe since unknown keys are ignored. Staying on v1 is the compatible move.
  • SD card is not deployable by a build tool. It is removable media; PlatformIO's filesystem targets cover on-chip flash only. This matters because the motivating sketch is SD-based.
  • Teensy has no PlatformIO buildfs, and its LittleFS_Program is wiped on re-upload — a real semantic difference, not an oversight.
  • FastLED has no LittleFS backend at all — only Arduino SD over SPI, WASM VFS, and a host stub.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions