fastled 1.1.45__tar.gz → 1.1.65__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. fastled-1.1.45/.github/workflows/create_version_tag.yml → fastled-1.1.65/.github/workflows/publish_release.yml +69 -32
  2. {fastled-1.1.45 → fastled-1.1.65}/.github/workflows/test_build_exe.yml +10 -1
  3. {fastled-1.1.45 → fastled-1.1.65}/PKG-INFO +28 -25
  4. {fastled-1.1.45 → fastled-1.1.65}/README.md +27 -24
  5. fastled-1.1.65/TODO.md +2 -0
  6. {fastled-1.1.45 → fastled-1.1.65}/examples/FxEngine/FxEngine.ino +1 -1
  7. {fastled-1.1.45 → fastled-1.1.65}/examples/NoisePlusPalette/NoisePlusPalette.ino +1 -1
  8. {fastled-1.1.45 → fastled-1.1.65}/examples/wasm/wasm.ino +1 -1
  9. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/__init__.py +1 -1
  10. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/parse_args.py +6 -6
  11. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/project_init.py +9 -2
  12. {fastled-1.1.45 → fastled-1.1.65}/src/fastled.egg-info/PKG-INFO +28 -25
  13. {fastled-1.1.45 → fastled-1.1.65}/src/fastled.egg-info/SOURCES.txt +2 -2
  14. {fastled-1.1.45 → fastled-1.1.65}/tests/test_ino/bad/bad.ino +1 -1
  15. {fastled-1.1.45 → fastled-1.1.65}/tests/test_ino/embedded/wasm.ino +1 -1
  16. {fastled-1.1.45 → fastled-1.1.65}/tests/test_ino/wasm/wasm.ino +1 -1
  17. fastled-1.1.45/.github/workflows/build_release.yml +0 -64
  18. {fastled-1.1.45 → fastled-1.1.65}/.aiderignore +0 -0
  19. {fastled-1.1.45 → fastled-1.1.65}/.github/workflows/build_multi_docker_image.yml +0 -0
  20. {fastled-1.1.45 → fastled-1.1.65}/.github/workflows/lint.yml +0 -0
  21. {fastled-1.1.45 → fastled-1.1.65}/.github/workflows/test_macos.yml +0 -0
  22. {fastled-1.1.45 → fastled-1.1.65}/.github/workflows/test_ubuntu.yml +0 -0
  23. {fastled-1.1.45 → fastled-1.1.65}/.github/workflows/test_win.yml +0 -0
  24. {fastled-1.1.45 → fastled-1.1.65}/.gitignore +0 -0
  25. {fastled-1.1.45 → fastled-1.1.65}/.pylintrc +0 -0
  26. {fastled-1.1.45 → fastled-1.1.65}/.vscode/launch.json +0 -0
  27. {fastled-1.1.45 → fastled-1.1.65}/.vscode/settings.json +0 -0
  28. {fastled-1.1.45 → fastled-1.1.65}/.vscode/tasks.json +0 -0
  29. {fastled-1.1.45 → fastled-1.1.65}/LICENSE +0 -0
  30. {fastled-1.1.45 → fastled-1.1.65}/MANIFEST.in +0 -0
  31. {fastled-1.1.45 → fastled-1.1.65}/build_exe.py +0 -0
  32. {fastled-1.1.45 → fastled-1.1.65}/clean +0 -0
  33. {fastled-1.1.45 → fastled-1.1.65}/docs/fastled.js +0 -0
  34. {fastled-1.1.45 → fastled-1.1.65}/docs/fastled.wasm +0 -0
  35. {fastled-1.1.45 → fastled-1.1.65}/docs/index.css +0 -0
  36. {fastled-1.1.45 → fastled-1.1.65}/docs/index.html +0 -0
  37. {fastled-1.1.45 → fastled-1.1.65}/docs/index.js +0 -0
  38. {fastled-1.1.45 → fastled-1.1.65}/examples/Blink/Blink.ino +0 -0
  39. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/Chromancer.ino +0 -0
  40. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/detail.h +0 -0
  41. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
  42. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
  43. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
  44. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/gen.py +0 -0
  45. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/mapping.h +0 -0
  46. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/net.h +0 -0
  47. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/output.json +0 -0
  48. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/ripple.h +0 -0
  49. {fastled-1.1.45 → fastled-1.1.65}/examples/Chromancer/screenmap.json.h +0 -0
  50. {fastled-1.1.45 → fastled-1.1.65}/examples/ColorPalette/ColorPalette.ino +0 -0
  51. {fastled-1.1.45 → fastled-1.1.65}/examples/ColorTemperature/ColorTemperature.ino +0 -0
  52. {fastled-1.1.45 → fastled-1.1.65}/examples/Cylon/Cylon.ino +0 -0
  53. {fastled-1.1.45 → fastled-1.1.65}/examples/DemoReel100/DemoReel100.ino +0 -0
  54. {fastled-1.1.45 → fastled-1.1.65}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
  55. {fastled-1.1.45 → fastled-1.1.65}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
  56. {fastled-1.1.45 → fastled-1.1.65}/examples/Fire2012/Fire2012.ino +0 -0
  57. {fastled-1.1.45 → fastled-1.1.65}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
  58. {fastled-1.1.45 → fastled-1.1.65}/examples/FirstLight/FirstLight.ino +0 -0
  59. {fastled-1.1.45 → fastled-1.1.65}/examples/Noise/Noise.ino +0 -0
  60. {fastled-1.1.45 → fastled-1.1.65}/examples/NoisePlayground/NoisePlayground.ino +0 -0
  61. {fastled-1.1.45 → fastled-1.1.65}/examples/OctoWS2811/OctoWS2811.ino +0 -0
  62. {fastled-1.1.45 → fastled-1.1.65}/examples/Pacifica/Pacifica.ino +0 -0
  63. {fastled-1.1.45 → fastled-1.1.65}/examples/Pride2015/Pride2015.ino +0 -0
  64. {fastled-1.1.45 → fastled-1.1.65}/examples/TwinkleFox/TwinkleFox.ino +0 -0
  65. {fastled-1.1.45 → fastled-1.1.65}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
  66. {fastled-1.1.45 → fastled-1.1.65}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
  67. {fastled-1.1.45 → fastled-1.1.65}/examples/Water/Water.ino +0 -0
  68. {fastled-1.1.45 → fastled-1.1.65}/examples/XYMatrix/XYMatrix.ino +0 -0
  69. {fastled-1.1.45 → fastled-1.1.65}/install +0 -0
  70. {fastled-1.1.45 → fastled-1.1.65}/lint +0 -0
  71. {fastled-1.1.45 → fastled-1.1.65}/pyproject.toml +0 -0
  72. {fastled-1.1.45 → fastled-1.1.65}/requirements.testing.txt +0 -0
  73. {fastled-1.1.45 → fastled-1.1.65}/setup.cfg +0 -0
  74. {fastled-1.1.45 → fastled-1.1.65}/setup.py +0 -0
  75. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/app.py +0 -0
  76. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/assets/example.txt +0 -0
  77. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/cli.py +0 -0
  78. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/client_server.py +0 -0
  79. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/compile_server.py +0 -0
  80. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/compile_server_impl.py +0 -0
  81. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/docker_manager.py +0 -0
  82. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/filewatcher.py +0 -0
  83. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/keyboard.py +0 -0
  84. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/live_client.py +0 -0
  85. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/open_browser.py +0 -0
  86. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/paths.py +0 -0
  87. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/select_sketch_directory.py +0 -0
  88. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/settings.py +0 -0
  89. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/sketch.py +0 -0
  90. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/spinner.py +0 -0
  91. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/string_diff.py +0 -0
  92. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/test/examples.py +0 -0
  93. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/types.py +0 -0
  94. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/util.py +0 -0
  95. {fastled-1.1.45 → fastled-1.1.65}/src/fastled/web_compile.py +0 -0
  96. {fastled-1.1.45 → fastled-1.1.65}/src/fastled.egg-info/dependency_links.txt +0 -0
  97. {fastled-1.1.45 → fastled-1.1.65}/src/fastled.egg-info/entry_points.txt +0 -0
  98. {fastled-1.1.45 → fastled-1.1.65}/src/fastled.egg-info/requires.txt +0 -0
  99. {fastled-1.1.45 → fastled-1.1.65}/src/fastled.egg-info/top_level.txt +0 -0
  100. {fastled-1.1.45 → fastled-1.1.65}/test +0 -0
  101. {fastled-1.1.45 → fastled-1.1.65}/tests/test_api.py +0 -0
  102. {fastled-1.1.45 → fastled-1.1.65}/tests/test_bad_ino.py +0 -0
  103. {fastled-1.1.45 → fastled-1.1.65}/tests/test_cli.py +0 -0
  104. {fastled-1.1.45 → fastled-1.1.65}/tests/test_compile_server.py +0 -0
  105. {fastled-1.1.45 → fastled-1.1.65}/tests/test_docker_linux_on_windows.py +0 -0
  106. {fastled-1.1.45 → fastled-1.1.65}/tests/test_embedded_data.py +0 -0
  107. {fastled-1.1.45 → fastled-1.1.65}/tests/test_examples.py +0 -0
  108. {fastled-1.1.45 → fastled-1.1.65}/tests/test_filechanger.py +0 -0
  109. {fastled-1.1.45 → fastled-1.1.65}/tests/test_ino/embedded/data/bigdata.dat +0 -0
  110. {fastled-1.1.45 → fastled-1.1.65}/tests/test_project_init.py +0 -0
  111. {fastled-1.1.45 → fastled-1.1.65}/tests/test_server_and_client_seperatly.py +0 -0
  112. {fastled-1.1.45 → fastled-1.1.65}/tests/test_webcompile.py +0 -0
  113. {fastled-1.1.45 → fastled-1.1.65}/upload_package.sh +0 -0
@@ -1,17 +1,21 @@
1
- name: Create Version Tag and Release
1
+ name: Publish Release
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
- paths:
8
- - 'src/fastled/__init__.py'
7
+ workflow_dispatch: # on button click
8
+
9
+ permissions:
10
+ contents: write
11
+ pull-requests: write
9
12
 
10
13
  jobs:
11
14
  create-tag:
12
15
  runs-on: ubuntu-latest
13
16
  permissions:
14
17
  contents: write
18
+ pull-requests: write
15
19
  outputs:
16
20
  new_version: ${{ steps.current_version.outputs.current }}
17
21
  should_release: ${{ steps.current_version.outputs.current != steps.prev_version.outputs.previous }}
@@ -42,50 +46,40 @@ jobs:
42
46
  id: prev_version
43
47
  run: |
44
48
  git checkout HEAD~1
49
+ ./clean
45
50
  uv run fastled --version > prev_version.txt
46
51
  echo "previous=$(cat prev_version.txt)" >> $GITHUB_OUTPUT
52
+ shell: bash
47
53
 
48
54
  - name: Create Tag if version changed
49
55
  if: steps.current_version.outputs.current != steps.prev_version.outputs.previous
56
+ env:
57
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50
58
  run: |
51
59
  git config --local user.email "action@github.com"
52
60
  git config --local user.name "GitHub Action"
53
61
  git tag -a "v${{ steps.current_version.outputs.current }}" -m "Release v${{ steps.current_version.outputs.current }}"
54
62
  git push origin "v${{ steps.current_version.outputs.current }}"
55
63
 
56
- build-and-publish:
57
- needs: create-tag
58
- if: needs.create-tag.outputs.should_release == 'true'
59
- runs-on: ubuntu-latest
60
- steps:
61
- - uses: actions/checkout@v4
62
-
63
- - name: Set up Python
64
- uses: actions/setup-python@v5
65
- with:
66
- python-version: '3.11'
67
-
68
- - name: Install build dependencies
69
- run: |
70
- python -m pip install --upgrade pip
71
- pip install build twine
72
-
73
- - name: Build package
74
- run: python -m build
75
-
76
- - name: Publish to PyPI
77
- env:
78
- TWINE_USERNAME: __token__
79
- TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
80
- run: twine upload dist/*
81
-
82
64
  build-executables:
83
- needs: [create-tag, build-and-publish]
65
+ needs: [create-tag]
84
66
  if: needs.create-tag.outputs.should_release == 'true'
85
67
  strategy:
86
68
  matrix:
87
- os: [ubuntu-latest, windows-latest, macos-latest]
88
- runs-on: ${{ matrix.os }}
69
+ include:
70
+ - os: ubuntu-latest
71
+ platform: linux/amd64
72
+ # Not available on GitHub Actions unless i run qemu
73
+ #- os: ubuntu-latest
74
+ # platform: ARM64
75
+ # runs-on: ubuntu-latest-arm64
76
+ - os: windows-latest
77
+ arch: X64
78
+ - os: macos-latest # arm64
79
+ arch: ARM64
80
+ - os: macos-13 # x86
81
+ arch: X64
82
+ runs-on: ${{ matrix.runs-on || matrix.os }}
89
83
 
90
84
  steps:
91
85
  - uses: actions/checkout@v4
@@ -104,6 +98,24 @@ jobs:
104
98
  - name: Build executable
105
99
  run: uv run build_exe.py
106
100
 
101
+ # Add signing step for Windows
102
+ - name: Decode and Sign Executable (Windows Only)
103
+ if: matrix.os == 'windows-latest'
104
+ run: |
105
+ echo "Installing Windows SDK..."
106
+ choco install windows-sdk-10-version-19041 -y
107
+ RefreshEnv
108
+
109
+ echo Decoding PFX file...
110
+ echo %FASTLED_PFX_B64% | certutil -decode - fastled.pfx
111
+
112
+ echo Signing executable...
113
+ "C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe" sign /f fastled.pfx /p "%FASTLED_PFX_PASSWORD%" /fd sha256 ./dist/fastled.exe
114
+
115
+ echo Verifying signature...
116
+ "C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe" verify /pa /v ./dist/fastled.exe
117
+ shell: cmd
118
+
107
119
  - name: Upload artifact
108
120
  uses: actions/upload-artifact@v3
109
121
  with:
@@ -129,6 +141,7 @@ jobs:
129
141
  # Rename files with platform-specific names
130
142
  [ -f artifacts/fastled-Windows-X64/fastled.exe ] && cp artifacts/fastled-Windows-X64/fastled.exe release/fastled-windows-x64.exe
131
143
  [ -f artifacts/fastled-Linux-X64/fastled ] && cp artifacts/fastled-Linux-X64/fastled release/fastled-linux-x64
144
+ [ -f artifacts/fastled-Linux-ARM64/fastled ] && cp artifacts/fastled-Linux-ARM64/fastled release/fastled-linux-arm64
132
145
  [ -f artifacts/fastled-macOS-ARM64/fastled ] && cp artifacts/fastled-macOS-ARM64/fastled release/fastled-macos-arm64
133
146
  [ -f artifacts/fastled-macOS-X64/fastled ] && cp artifacts/fastled-macOS-X64/fastled release/fastled-macos-x64
134
147
  chmod +x release/fastled-*
@@ -140,3 +153,27 @@ jobs:
140
153
  files: release/*
141
154
  draft: false
142
155
  prerelease: false
156
+
157
+ publish-pypi:
158
+ needs: [create-tag]
159
+ if: needs.create-tag.outputs.should_release == 'true'
160
+ runs-on: ubuntu-latest
161
+ steps:
162
+ - uses: actions/checkout@v4
163
+
164
+ - name: Set up Python
165
+ uses: actions/setup-python@v5
166
+ with:
167
+ python-version: '3.11'
168
+
169
+ - name: Install dependencies for PyPI publishing
170
+ run: |
171
+ pip install build twine
172
+
173
+ - name: Build and Publish to PyPI
174
+ env:
175
+ TWINE_USERNAME: "__token__"
176
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
177
+ run: |
178
+ python -m build
179
+ python -m twine upload dist/*
@@ -7,7 +7,12 @@ jobs:
7
7
  runs-on: ${{ matrix.os }}
8
8
  strategy:
9
9
  matrix:
10
- os: [ubuntu-latest, windows-latest, macos-latest]
10
+ os: [
11
+ ubuntu-latest, # linux/amd64
12
+ windows-latest, # x64
13
+ macos-latest, # arm64
14
+ macos-13 # x86
15
+ ]
11
16
  python-version: [3.11]
12
17
 
13
18
  steps:
@@ -35,6 +40,10 @@ jobs:
35
40
  else
36
41
  ./dist/fastled --version
37
42
  fi
43
+
44
+ if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
45
+ ./dist/fastled --init wasm && ./dist/fastled --just-compile --local fastled/wasm
46
+ fi
38
47
 
39
48
  - name: Upload artifacts
40
49
  uses: actions/upload-artifact@v3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastled
3
- Version: 1.1.45
3
+ Version: 1.1.65
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -33,8 +33,7 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
33
33
 
34
34
  [![Build and Push Multi Docker Image](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
35
35
  [![Build Executables](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
36
- [![Create Version Tag](https://github.com/zackees/fastled-wasm/actions/workflows/create_version_tag.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/create_version_tag.yml)
37
- [![Build and Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/build_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_release.yml)
36
+ [![Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
38
37
 
39
38
 
40
39
  # About
@@ -88,7 +87,7 @@ You can also spawn a server in one process and then access it in another, like t
88
87
  ```bash
89
88
  fastled --server # server will now run in the background.
90
89
  # now launch the client
91
- fastled examples/wasm --local # local will find the local server use it do the compile.
90
+ fastled examples/wasm --local # local will find the local server and use it to do the compile.
92
91
  ```
93
92
 
94
93
  After compilation a web browser windows will pop up. Changes to the sketch will automatically trigger a recompilation.
@@ -184,7 +183,7 @@ with Api.server() as server:
184
183
 
185
184
  ## Hot reload by default
186
185
 
187
- Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
186
+ Once launched, the compiler will remain open, listening to changes and recompiling as necessary, hot-reloading the sketch into the current browser.
188
187
 
189
188
  This style of development should be familiar to those doing web development.
190
189
 
@@ -193,19 +192,19 @@ This style of development should be familiar to those doing web development.
193
192
  If you launch `fastled` in the FastLED repo then this tool will automatically detect this and map the src directory into the
194
193
  host container. Whenever there are changes in the source code from the mapped directory, then these will be re-compiled
195
194
  on the next change or if you hit the space bar when prompted. Unlike a sketch folder, a re-compile on the FastLED src
196
- can be much longer, for example if you modify a header file.
195
+ can be much longer, for example, if you modify a header file.
197
196
 
198
197
  ## Big Data in `/data` directory won't be round-tripped
199
198
 
200
199
  Huge blobs of data like video will absolutely kill the compile performance as these blobs would normally have to be shuffled
201
200
  back and forth. Therefore a special directory `data/` is implicitly used to hold this blob data. Any data in this directory
202
- will be replaced with a stub containing the size and hash of the file during upload. On download these stubs are swapped back
201
+ will be replaced with a stub containing the size and hash of the file during upload. On download, these stubs are swapped back
203
202
  with their originals during decompression.
204
203
 
205
- The wasm compiler will recognize all files in the `data/` directory and generate a `files.json` manifest and can be used
204
+ The wasm compiler will recognize all files in the `data/` directory and generate a `files.json` manifest which can be used
206
205
  in your wasm sketch using an emulated SD card system mounted at `/data/` on the SD Card. In order to increase load speed, these
207
- files will be asynchroniously streamed into the running sketch instance during runtime. Files named with *.json, *.csv, *.txt will be
208
- immediately injected in the app before setup() is called and can be used immediatly in setup() in their entirety.
206
+ files will be asynchronously streamed into the running sketch instance during runtime. Files named with *.json, *.csv, *.txt will be
207
+ immediately injected in the app before setup() is called and can be used immediately in setup() in their entirety.
209
208
 
210
209
  All other files will be streamed in. The `Video` element in FastLED is designed to gracefully handle missing data streamed in through
211
210
  the file system.
@@ -214,30 +213,30 @@ For an example of how to use this see `examples/SdCard` which is fully wasm comp
214
213
 
215
214
  ## Compile Speed
216
215
 
217
- The compile speeds for this compiler have been optimized pretty much to the max. There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will aggressively optimize for size. The speed difference between `--release` and `--quick` seems negligable. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step through debugging. It works better than expected, but don't expect to have gdb or msvc debugger level of debugging experience.
216
+ There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will optimize for size, although the speed difference between `--release` and `--quick` seems negligible. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step-through debugging. In my personal tests it works better than expected, but don't expect to have gdb or msvc debugger level of the debugging experience.
218
217
 
219
- We use `ccache` to cache object files. This seems actually help a lot and is better than platformio's method of tracking what needs to be rebuilt. This works as a two tier cache system. What Platformio misses will be covered by ccache's more advanced file changing system.
218
+ We use `ccache` to cache object files. This seems actually help a lot and is better than Platformio's method of tracking what needs to be rebuilt. This works as a two-tier cache system. What Platformio misses will be covered by ccache's more advanced file changing system.
220
219
 
221
- The compilation to wasm will happen under a lock. Removing this lock requires removing the platformio toolchain as the compiler backend which enforces it's own internal lock preventing parallel use.
220
+ The compilation to wasm will happen under a lock. Removing this lock requires removing the Platformio toolchain as the compiler backend which enforces its own internal lock preventing parallel use.
222
221
 
223
222
  ## Sketch Cache
224
223
 
225
- Sketchs are aggressively finger-printed and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
226
- printing while the actual source files are sent to compiler to preserve line numbers and file names.
224
+ Sketches are aggressively fingerprinted and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
225
+ printing while the actual source files are sent to the compiler to preserve line numbers and file names.
227
226
 
228
- This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments even if the compiler is executing under it's lock.
227
+ This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments.
229
228
 
230
229
  ## Local compiles
231
230
 
232
- If the web-compiler get's congested then it's recommend that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launching a webserver and then connecting to it with the client once it's been up.
231
+ If the web compiler gets congested then it's recommended that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launch a webserver, and then connect to it with the client once it's been up.
233
232
 
234
233
  ## Auto updates
235
234
 
236
- In server mode the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long running instance to stay updated.
235
+ In server mode, the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long-running instance to stay updated.
237
236
 
238
- ## Compatibility with Arduino sketchs
237
+ ## Compatibility with Arduino sketches
239
238
 
240
- The compatibility is actually pretty good. Most simple sketchs should compile out of the box. Even some of the avr platform includes are stubbed out to make it work. The familiar `digitalWrite()`, `Serial.println()` and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
239
+ The compatibility is pretty good. Most simple sketches should compile out of the box. Even some of the AVR platforms are stubbed out to make it work. For Arduino, the familiar `digitalWrite()`, `Serial.println()`, and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
241
240
 
242
241
  ### Faqs
243
242
 
@@ -245,22 +244,26 @@ Q: How often is the docker image updated?
245
244
  A: It's scheduled for rebuild once a day at 3am Pacific time, and also on every change to this repo.
246
245
 
247
246
  Q: How can I run my own cloud instance of the FastLED wasm compiler?
248
- A: Render.com (which fastled is hosted on) or DigialOcean can accept a github repo and auto-build the docker image.
247
+ A: Render.com (which fastled is hosted on) or DigialOcean can accept a GitHub repo and auto-build the docker image.
249
248
 
250
249
  Q: Why does FastLED tend to become choppy when the browser is in the background?
251
250
  A: FastLED Wasm currently runs on the main thread and therefor Chrome will begin throttling the event loop when the browser is not in the foreground. The solution to this is to move FastLED to a web worker where it will get a background thread that Chrome / Firefox won't throttle.
252
251
 
253
252
  Q: Why does a long `delay()` cause the browser to freeze and become sluggish?
254
- A: `delay()` will block `loop()` which blocks the main thread of the browser. The solution is a webworker which will not affect main thread performance of the browser.
253
+ A: `delay()` will block `loop()` which blocks the main thread of the browser. The solution is a webworker which will not affect the main thread performance of the browser.
255
254
 
256
255
 
257
256
  Q: How can I get the compiled size of my FastLED sketch smaller?
258
- A: A big chunk of space is being used by unnecessary javascript `emscripten` is bundling. This can be tweeked by the wasm_compiler_settings.py file in the FastLED repo.
259
-
257
+ A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
260
258
 
261
259
  # Revisions
262
260
 
263
- * 1.1.45 - Aniother try for web publishing from github.
261
+ * 1.1.61 - Excluded non compiling examples from the Test object as part of the api - no sense in having them if they won't compile.
262
+ * 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
263
+ * 1.1.52 - Add linux-arm
264
+ * 1.1.49 - Try again.
265
+ * 1.1.46 - Add mac x86 exe
266
+ * 1.1.45 - Another try for web publishing from github.
264
267
  * 1.1.42 - Second test for web publishing from github.
265
268
  * 1.1.41 - Platform executable (through pyinstaller) now enabled.
266
269
  * 1.1.40 - Remove `sketch_directory` from Api object. This was only needed before we had a client/server architecture.
@@ -10,8 +10,7 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
10
10
 
11
11
  [![Build and Push Multi Docker Image](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
12
12
  [![Build Executables](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
13
- [![Create Version Tag](https://github.com/zackees/fastled-wasm/actions/workflows/create_version_tag.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/create_version_tag.yml)
14
- [![Build and Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/build_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_release.yml)
13
+ [![Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
15
14
 
16
15
 
17
16
  # About
@@ -65,7 +64,7 @@ You can also spawn a server in one process and then access it in another, like t
65
64
  ```bash
66
65
  fastled --server # server will now run in the background.
67
66
  # now launch the client
68
- fastled examples/wasm --local # local will find the local server use it do the compile.
67
+ fastled examples/wasm --local # local will find the local server and use it to do the compile.
69
68
  ```
70
69
 
71
70
  After compilation a web browser windows will pop up. Changes to the sketch will automatically trigger a recompilation.
@@ -161,7 +160,7 @@ with Api.server() as server:
161
160
 
162
161
  ## Hot reload by default
163
162
 
164
- Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
163
+ Once launched, the compiler will remain open, listening to changes and recompiling as necessary, hot-reloading the sketch into the current browser.
165
164
 
166
165
  This style of development should be familiar to those doing web development.
167
166
 
@@ -170,19 +169,19 @@ This style of development should be familiar to those doing web development.
170
169
  If you launch `fastled` in the FastLED repo then this tool will automatically detect this and map the src directory into the
171
170
  host container. Whenever there are changes in the source code from the mapped directory, then these will be re-compiled
172
171
  on the next change or if you hit the space bar when prompted. Unlike a sketch folder, a re-compile on the FastLED src
173
- can be much longer, for example if you modify a header file.
172
+ can be much longer, for example, if you modify a header file.
174
173
 
175
174
  ## Big Data in `/data` directory won't be round-tripped
176
175
 
177
176
  Huge blobs of data like video will absolutely kill the compile performance as these blobs would normally have to be shuffled
178
177
  back and forth. Therefore a special directory `data/` is implicitly used to hold this blob data. Any data in this directory
179
- will be replaced with a stub containing the size and hash of the file during upload. On download these stubs are swapped back
178
+ will be replaced with a stub containing the size and hash of the file during upload. On download, these stubs are swapped back
180
179
  with their originals during decompression.
181
180
 
182
- The wasm compiler will recognize all files in the `data/` directory and generate a `files.json` manifest and can be used
181
+ The wasm compiler will recognize all files in the `data/` directory and generate a `files.json` manifest which can be used
183
182
  in your wasm sketch using an emulated SD card system mounted at `/data/` on the SD Card. In order to increase load speed, these
184
- files will be asynchroniously streamed into the running sketch instance during runtime. Files named with *.json, *.csv, *.txt will be
185
- immediately injected in the app before setup() is called and can be used immediatly in setup() in their entirety.
183
+ files will be asynchronously streamed into the running sketch instance during runtime. Files named with *.json, *.csv, *.txt will be
184
+ immediately injected in the app before setup() is called and can be used immediately in setup() in their entirety.
186
185
 
187
186
  All other files will be streamed in. The `Video` element in FastLED is designed to gracefully handle missing data streamed in through
188
187
  the file system.
@@ -191,30 +190,30 @@ For an example of how to use this see `examples/SdCard` which is fully wasm comp
191
190
 
192
191
  ## Compile Speed
193
192
 
194
- The compile speeds for this compiler have been optimized pretty much to the max. There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will aggressively optimize for size. The speed difference between `--release` and `--quick` seems negligable. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step through debugging. It works better than expected, but don't expect to have gdb or msvc debugger level of debugging experience.
193
+ There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will optimize for size, although the speed difference between `--release` and `--quick` seems negligible. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step-through debugging. In my personal tests it works better than expected, but don't expect to have gdb or msvc debugger level of the debugging experience.
195
194
 
196
- We use `ccache` to cache object files. This seems actually help a lot and is better than platformio's method of tracking what needs to be rebuilt. This works as a two tier cache system. What Platformio misses will be covered by ccache's more advanced file changing system.
195
+ We use `ccache` to cache object files. This seems actually help a lot and is better than Platformio's method of tracking what needs to be rebuilt. This works as a two-tier cache system. What Platformio misses will be covered by ccache's more advanced file changing system.
197
196
 
198
- The compilation to wasm will happen under a lock. Removing this lock requires removing the platformio toolchain as the compiler backend which enforces it's own internal lock preventing parallel use.
197
+ The compilation to wasm will happen under a lock. Removing this lock requires removing the Platformio toolchain as the compiler backend which enforces its own internal lock preventing parallel use.
199
198
 
200
199
  ## Sketch Cache
201
200
 
202
- Sketchs are aggressively finger-printed and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
203
- printing while the actual source files are sent to compiler to preserve line numbers and file names.
201
+ Sketches are aggressively fingerprinted and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
202
+ printing while the actual source files are sent to the compiler to preserve line numbers and file names.
204
203
 
205
- This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments even if the compiler is executing under it's lock.
204
+ This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments.
206
205
 
207
206
  ## Local compiles
208
207
 
209
- If the web-compiler get's congested then it's recommend that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launching a webserver and then connecting to it with the client once it's been up.
208
+ If the web compiler gets congested then it's recommended that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launch a webserver, and then connect to it with the client once it's been up.
210
209
 
211
210
  ## Auto updates
212
211
 
213
- In server mode the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long running instance to stay updated.
212
+ In server mode, the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long-running instance to stay updated.
214
213
 
215
- ## Compatibility with Arduino sketchs
214
+ ## Compatibility with Arduino sketches
216
215
 
217
- The compatibility is actually pretty good. Most simple sketchs should compile out of the box. Even some of the avr platform includes are stubbed out to make it work. The familiar `digitalWrite()`, `Serial.println()` and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
216
+ The compatibility is pretty good. Most simple sketches should compile out of the box. Even some of the AVR platforms are stubbed out to make it work. For Arduino, the familiar `digitalWrite()`, `Serial.println()`, and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
218
217
 
219
218
  ### Faqs
220
219
 
@@ -222,22 +221,26 @@ Q: How often is the docker image updated?
222
221
  A: It's scheduled for rebuild once a day at 3am Pacific time, and also on every change to this repo.
223
222
 
224
223
  Q: How can I run my own cloud instance of the FastLED wasm compiler?
225
- A: Render.com (which fastled is hosted on) or DigialOcean can accept a github repo and auto-build the docker image.
224
+ A: Render.com (which fastled is hosted on) or DigialOcean can accept a GitHub repo and auto-build the docker image.
226
225
 
227
226
  Q: Why does FastLED tend to become choppy when the browser is in the background?
228
227
  A: FastLED Wasm currently runs on the main thread and therefor Chrome will begin throttling the event loop when the browser is not in the foreground. The solution to this is to move FastLED to a web worker where it will get a background thread that Chrome / Firefox won't throttle.
229
228
 
230
229
  Q: Why does a long `delay()` cause the browser to freeze and become sluggish?
231
- A: `delay()` will block `loop()` which blocks the main thread of the browser. The solution is a webworker which will not affect main thread performance of the browser.
230
+ A: `delay()` will block `loop()` which blocks the main thread of the browser. The solution is a webworker which will not affect the main thread performance of the browser.
232
231
 
233
232
 
234
233
  Q: How can I get the compiled size of my FastLED sketch smaller?
235
- A: A big chunk of space is being used by unnecessary javascript `emscripten` is bundling. This can be tweeked by the wasm_compiler_settings.py file in the FastLED repo.
236
-
234
+ A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
237
235
 
238
236
  # Revisions
239
237
 
240
- * 1.1.45 - Aniother try for web publishing from github.
238
+ * 1.1.61 - Excluded non compiling examples from the Test object as part of the api - no sense in having them if they won't compile.
239
+ * 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
240
+ * 1.1.52 - Add linux-arm
241
+ * 1.1.49 - Try again.
242
+ * 1.1.46 - Add mac x86 exe
243
+ * 1.1.45 - Another try for web publishing from github.
241
244
  * 1.1.42 - Second test for web publishing from github.
242
245
  * 1.1.41 - Platform executable (through pyinstaller) now enabled.
243
246
  * 1.1.40 - Remove `sketch_directory` from Api object. This was only needed before we had a client/server architecture.
fastled-1.1.65/TODO.md ADDED
@@ -0,0 +1,2 @@
1
+ https://github.com/marketplace/actions/code-sign-action
2
+ https://docs.sigstore.dev/about/api-stability/
@@ -5,7 +5,7 @@
5
5
 
6
6
  #include <FastLED.h>
7
7
 
8
- #include "fx/2d/noisepalette.hpp"
8
+ #include "fx/2d/noisepalette.h"
9
9
  #include "fx/2d/animartrix.hpp"
10
10
  #include "fx/fx_engine.h"
11
11
  #include "fx/storage/sd.h"
@@ -15,7 +15,7 @@
15
15
  #if COMPILE_NOISEPLUSPALETTE
16
16
 
17
17
  #include <FastLED.h>
18
- #include "fx/2d/noisepalette.hpp"
18
+ #include "fx/2d/noisepalette.h"
19
19
  #include "fl/ui.h"
20
20
 
21
21
  #define LED_PIN 3
@@ -13,7 +13,7 @@
13
13
  #include <string>
14
14
 
15
15
  #include <FastLED.h>
16
- #include "fx/2d/noisepalette.hpp"
16
+ #include "fx/2d/noisepalette.h"
17
17
  #include "fl/json.h"
18
18
  #include "fl/slice.h"
19
19
  #include "fx/fx_engine.h"
@@ -9,7 +9,7 @@ from .compile_server import CompileServer
9
9
  from .live_client import LiveClient
10
10
  from .types import BuildMode, CompileResult, CompileServerError
11
11
 
12
- __version__ = "1.1.45"
12
+ __version__ = "1.1.65"
13
13
 
14
14
 
15
15
  class Api:
@@ -18,9 +18,7 @@ from fastled.sketch import (
18
18
  def parse_args() -> argparse.Namespace:
19
19
  """Parse command-line arguments."""
20
20
  parser = argparse.ArgumentParser(description=f"FastLED WASM Compiler {__version__}")
21
- parser.add_argument(
22
- "--version", action="version", version=f"{__version__}"
23
- )
21
+ parser.add_argument("--version", action="version", version=f"{__version__}")
24
22
  parser.add_argument(
25
23
  "directory",
26
24
  type=str,
@@ -30,8 +28,9 @@ def parse_args() -> argparse.Namespace:
30
28
  )
31
29
  parser.add_argument(
32
30
  "--init",
33
- action="store_true",
34
- help="Initialize the FastLED sketch in the current directory",
31
+ nargs="?",
32
+ const=True,
33
+ help="Initialize the FastLED sketch in the current directory. Optional name can be provided",
35
34
  )
36
35
  parser.add_argument(
37
36
  "--just-compile",
@@ -105,7 +104,8 @@ def parse_args() -> argparse.Namespace:
105
104
  args = parser.parse_args()
106
105
 
107
106
  if args.init:
108
- args.directory = project_init()
107
+ example = args.init if args.init is not True else None
108
+ args.directory = project_init(example)
109
109
  print("\nInitialized FastLED project in", args.directory)
110
110
  print(f"Use 'fastled {args.directory}' to compile the project.")
111
111
  sys.exit(0)
@@ -9,12 +9,19 @@ ENDPOINT_PROJECT_INIT = f"{DEFAULT_URL}/project/init"
9
9
  ENDPOINT_INFO = f"{DEFAULT_URL}/info"
10
10
  DEFAULT_EXAMPLE = "wasm"
11
11
 
12
+ _EXCLUDED_EXAMPLES = [
13
+ "Pintest",
14
+ "OctoWS2811",
15
+ ]
16
+
12
17
 
13
18
  def get_examples() -> list[str]:
14
19
  response = httpx.get(ENDPOINT_INFO, timeout=4)
15
20
  response.raise_for_status()
16
- out: list[str] = response.json()["examples"]
17
- return sorted(out)
21
+ examples: list[str] = response.json()["examples"]
22
+ # filter out excluded examples
23
+ examples = [example for example in examples if example not in _EXCLUDED_EXAMPLES]
24
+ return sorted(examples)
18
25
 
19
26
 
20
27
  def _prompt_for_example() -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastled
3
- Version: 1.1.45
3
+ Version: 1.1.65
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -33,8 +33,7 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
33
33
 
34
34
  [![Build and Push Multi Docker Image](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
35
35
  [![Build Executables](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
36
- [![Create Version Tag](https://github.com/zackees/fastled-wasm/actions/workflows/create_version_tag.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/create_version_tag.yml)
37
- [![Build and Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/build_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_release.yml)
36
+ [![Publish Release](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
38
37
 
39
38
 
40
39
  # About
@@ -88,7 +87,7 @@ You can also spawn a server in one process and then access it in another, like t
88
87
  ```bash
89
88
  fastled --server # server will now run in the background.
90
89
  # now launch the client
91
- fastled examples/wasm --local # local will find the local server use it do the compile.
90
+ fastled examples/wasm --local # local will find the local server and use it to do the compile.
92
91
  ```
93
92
 
94
93
  After compilation a web browser windows will pop up. Changes to the sketch will automatically trigger a recompilation.
@@ -184,7 +183,7 @@ with Api.server() as server:
184
183
 
185
184
  ## Hot reload by default
186
185
 
187
- Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
186
+ Once launched, the compiler will remain open, listening to changes and recompiling as necessary, hot-reloading the sketch into the current browser.
188
187
 
189
188
  This style of development should be familiar to those doing web development.
190
189
 
@@ -193,19 +192,19 @@ This style of development should be familiar to those doing web development.
193
192
  If you launch `fastled` in the FastLED repo then this tool will automatically detect this and map the src directory into the
194
193
  host container. Whenever there are changes in the source code from the mapped directory, then these will be re-compiled
195
194
  on the next change or if you hit the space bar when prompted. Unlike a sketch folder, a re-compile on the FastLED src
196
- can be much longer, for example if you modify a header file.
195
+ can be much longer, for example, if you modify a header file.
197
196
 
198
197
  ## Big Data in `/data` directory won't be round-tripped
199
198
 
200
199
  Huge blobs of data like video will absolutely kill the compile performance as these blobs would normally have to be shuffled
201
200
  back and forth. Therefore a special directory `data/` is implicitly used to hold this blob data. Any data in this directory
202
- will be replaced with a stub containing the size and hash of the file during upload. On download these stubs are swapped back
201
+ will be replaced with a stub containing the size and hash of the file during upload. On download, these stubs are swapped back
203
202
  with their originals during decompression.
204
203
 
205
- The wasm compiler will recognize all files in the `data/` directory and generate a `files.json` manifest and can be used
204
+ The wasm compiler will recognize all files in the `data/` directory and generate a `files.json` manifest which can be used
206
205
  in your wasm sketch using an emulated SD card system mounted at `/data/` on the SD Card. In order to increase load speed, these
207
- files will be asynchroniously streamed into the running sketch instance during runtime. Files named with *.json, *.csv, *.txt will be
208
- immediately injected in the app before setup() is called and can be used immediatly in setup() in their entirety.
206
+ files will be asynchronously streamed into the running sketch instance during runtime. Files named with *.json, *.csv, *.txt will be
207
+ immediately injected in the app before setup() is called and can be used immediately in setup() in their entirety.
209
208
 
210
209
  All other files will be streamed in. The `Video` element in FastLED is designed to gracefully handle missing data streamed in through
211
210
  the file system.
@@ -214,30 +213,30 @@ For an example of how to use this see `examples/SdCard` which is fully wasm comp
214
213
 
215
214
  ## Compile Speed
216
215
 
217
- The compile speeds for this compiler have been optimized pretty much to the max. There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will aggressively optimize for size. The speed difference between `--release` and `--quick` seems negligable. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step through debugging. It works better than expected, but don't expect to have gdb or msvc debugger level of debugging experience.
216
+ There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will optimize for size, although the speed difference between `--release` and `--quick` seems negligible. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step-through debugging. In my personal tests it works better than expected, but don't expect to have gdb or msvc debugger level of the debugging experience.
218
217
 
219
- We use `ccache` to cache object files. This seems actually help a lot and is better than platformio's method of tracking what needs to be rebuilt. This works as a two tier cache system. What Platformio misses will be covered by ccache's more advanced file changing system.
218
+ We use `ccache` to cache object files. This seems actually help a lot and is better than Platformio's method of tracking what needs to be rebuilt. This works as a two-tier cache system. What Platformio misses will be covered by ccache's more advanced file changing system.
220
219
 
221
- The compilation to wasm will happen under a lock. Removing this lock requires removing the platformio toolchain as the compiler backend which enforces it's own internal lock preventing parallel use.
220
+ The compilation to wasm will happen under a lock. Removing this lock requires removing the Platformio toolchain as the compiler backend which enforces its own internal lock preventing parallel use.
222
221
 
223
222
  ## Sketch Cache
224
223
 
225
- Sketchs are aggressively finger-printed and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
226
- printing while the actual source files are sent to compiler to preserve line numbers and file names.
224
+ Sketches are aggressively fingerprinted and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
225
+ printing while the actual source files are sent to the compiler to preserve line numbers and file names.
227
226
 
228
- This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments even if the compiler is executing under it's lock.
227
+ This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments.
229
228
 
230
229
  ## Local compiles
231
230
 
232
- If the web-compiler get's congested then it's recommend that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launching a webserver and then connecting to it with the client once it's been up.
231
+ If the web compiler gets congested then it's recommended that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launch a webserver, and then connect to it with the client once it's been up.
233
232
 
234
233
  ## Auto updates
235
234
 
236
- In server mode the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long running instance to stay updated.
235
+ In server mode, the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long-running instance to stay updated.
237
236
 
238
- ## Compatibility with Arduino sketchs
237
+ ## Compatibility with Arduino sketches
239
238
 
240
- The compatibility is actually pretty good. Most simple sketchs should compile out of the box. Even some of the avr platform includes are stubbed out to make it work. The familiar `digitalWrite()`, `Serial.println()` and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
239
+ The compatibility is pretty good. Most simple sketches should compile out of the box. Even some of the AVR platforms are stubbed out to make it work. For Arduino, the familiar `digitalWrite()`, `Serial.println()`, and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
241
240
 
242
241
  ### Faqs
243
242
 
@@ -245,22 +244,26 @@ Q: How often is the docker image updated?
245
244
  A: It's scheduled for rebuild once a day at 3am Pacific time, and also on every change to this repo.
246
245
 
247
246
  Q: How can I run my own cloud instance of the FastLED wasm compiler?
248
- A: Render.com (which fastled is hosted on) or DigialOcean can accept a github repo and auto-build the docker image.
247
+ A: Render.com (which fastled is hosted on) or DigialOcean can accept a GitHub repo and auto-build the docker image.
249
248
 
250
249
  Q: Why does FastLED tend to become choppy when the browser is in the background?
251
250
  A: FastLED Wasm currently runs on the main thread and therefor Chrome will begin throttling the event loop when the browser is not in the foreground. The solution to this is to move FastLED to a web worker where it will get a background thread that Chrome / Firefox won't throttle.
252
251
 
253
252
  Q: Why does a long `delay()` cause the browser to freeze and become sluggish?
254
- A: `delay()` will block `loop()` which blocks the main thread of the browser. The solution is a webworker which will not affect main thread performance of the browser.
253
+ A: `delay()` will block `loop()` which blocks the main thread of the browser. The solution is a webworker which will not affect the main thread performance of the browser.
255
254
 
256
255
 
257
256
  Q: How can I get the compiled size of my FastLED sketch smaller?
258
- A: A big chunk of space is being used by unnecessary javascript `emscripten` is bundling. This can be tweeked by the wasm_compiler_settings.py file in the FastLED repo.
259
-
257
+ A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
260
258
 
261
259
  # Revisions
262
260
 
263
- * 1.1.45 - Aniother try for web publishing from github.
261
+ * 1.1.61 - Excluded non compiling examples from the Test object as part of the api - no sense in having them if they won't compile.
262
+ * 1.1.60 - Platform executables (macos-arm/macos-x86/windows/linux-x86) now auto building with each release. Add tests.
263
+ * 1.1.52 - Add linux-arm
264
+ * 1.1.49 - Try again.
265
+ * 1.1.46 - Add mac x86 exe
266
+ * 1.1.45 - Another try for web publishing from github.
264
267
  * 1.1.42 - Second test for web publishing from github.
265
268
  * 1.1.41 - Platform executable (through pyinstaller) now enabled.
266
269
  * 1.1.40 - Remove `sketch_directory` from Api object. This was only needed before we had a client/server architecture.
@@ -4,6 +4,7 @@
4
4
  LICENSE
5
5
  MANIFEST.in
6
6
  README.md
7
+ TODO.md
7
8
  build_exe.py
8
9
  clean
9
10
  install
@@ -14,9 +15,8 @@ setup.py
14
15
  test
15
16
  upload_package.sh
16
17
  .github/workflows/build_multi_docker_image.yml
17
- .github/workflows/build_release.yml
18
- .github/workflows/create_version_tag.yml
19
18
  .github/workflows/lint.yml
19
+ .github/workflows/publish_release.yml
20
20
  .github/workflows/test_build_exe.yml
21
21
  .github/workflows/test_macos.yml
22
22
  .github/workflows/test_ubuntu.yml
@@ -11,7 +11,7 @@ lsfjsdklfjdskfjkasdfjdsfds /// the garbage heare should trigger a build failure.
11
11
  #include <string>
12
12
 
13
13
  #include <FastLED.h>
14
- #include "fx/2d/noisepalette.hpp"
14
+ #include "fx/2d/noisepalette.h"
15
15
  #include "fl/json.h"
16
16
  #include "fl/slice.h"
17
17
  #include "fx/fx_engine.h"
@@ -8,7 +8,7 @@
8
8
  #include <string>
9
9
 
10
10
  #include <FastLED.h>
11
- #include "fx/2d/noisepalette.hpp"
11
+ #include "fx/2d/noisepalette.h"
12
12
  #include "fl/json.h"
13
13
  #include "fl/slice.h"
14
14
  #include "fx/fx_engine.h"
@@ -8,7 +8,7 @@
8
8
  #include <string>
9
9
 
10
10
  #include <FastLED.h>
11
- #include "fx/2d/noisepalette.hpp"
11
+ #include "fx/2d/noisepalette.h"
12
12
  #include "fl/json.h"
13
13
  #include "fl/slice.h"
14
14
  #include "fx/fx_engine.h"
@@ -1,64 +0,0 @@
1
- name: Build and Publish Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*' # Trigger on version tags
7
-
8
- jobs:
9
- build-and-publish:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v4
13
-
14
- - name: Set up Python
15
- uses: actions/setup-python@v5
16
- with:
17
- python-version: '3.11'
18
-
19
- - name: Install build dependencies
20
- run: |
21
- python -m pip install --upgrade pip
22
- pip install build twine
23
-
24
- - name: Build package
25
- run: python -m build
26
-
27
- - name: Publish to PyPI
28
- env:
29
- TWINE_USERNAME: __token__
30
- TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31
- run: twine upload dist/*
32
-
33
- build-executables:
34
- needs: build-and-publish
35
- strategy:
36
- matrix:
37
- os: [ubuntu-latest, windows-latest, macos-latest]
38
- runs-on: ${{ matrix.os }}
39
-
40
- steps:
41
- - uses: actions/checkout@v4
42
-
43
- - uses: actions/setup-python@v5
44
- with:
45
- python-version: '3.11'
46
-
47
- - name: Install UV
48
- run: pip install uv
49
-
50
- - name: Install dependencies
51
- run: ./install
52
- shell: bash
53
-
54
- - name: Build executable
55
- run: uv run build_exe.py
56
-
57
- - name: Upload Release Asset
58
- uses: softprops/action-gh-release@v1
59
- with:
60
- files: |
61
- dist/fastled
62
- dist/fastled.exe
63
- draft: false
64
- prerelease: false
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes