fastled 1.0.12__py2.py3-none-any.whl → 1.0.15__py2.py3-none-any.whl

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.
fastled/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """FastLED Wasm Compiler package."""
2
2
 
3
- __version__ = "1.0.12"
3
+ __version__ = "1.0.15"
fastled/app.py CHANGED
@@ -93,8 +93,9 @@ def parse_args() -> argparse.Namespace:
93
93
  )
94
94
  build_mode.add_argument(
95
95
  "--localhost",
96
+ "--local",
96
97
  action="store_true",
97
- help="Use localhost for web compilation from an instance of fastled --server",
98
+ help="Use localhost for web compilation from an instance of fastled --server, creating it if necessary",
98
99
  )
99
100
  build_mode.add_argument(
100
101
  "--server",
@@ -115,11 +116,10 @@ def parse_args() -> argparse.Namespace:
115
116
  print(f"Using web compiler at {DEFAULT_URL}")
116
117
  args.web = DEFAULT_URL
117
118
  if cwd_is_fastled and not args.web:
119
+ print("Forcing --local mode because we are in the FastLED repo")
118
120
  args.localhost = True
119
121
  if args.localhost:
120
122
  args.web = "localhost"
121
- if args.server and args.web:
122
- parser.error("--server and --web are mutually exclusive")
123
123
  if args.interactive and not args.server:
124
124
  print("--interactive forces --server mode")
125
125
  args.server = True
@@ -206,6 +206,8 @@ def _try_start_server_or_get_url(args: argparse.Namespace) -> str | CompileServe
206
206
  result: ConnectionResult | None = find_good_connection([addr])
207
207
  if result is not None:
208
208
  print(f"Found local server at {result.host}")
209
+ return result.host
210
+ else:
209
211
  local_host_needs_server = True
210
212
 
211
213
  if not local_host_needs_server and args.web:
@@ -419,8 +421,9 @@ def main() -> int:
419
421
 
420
422
  if __name__ == "__main__":
421
423
  try:
422
- os.chdir("../fastled")
424
+ # os.chdir("../fastled")
423
425
  sys.argv.append("examples/SdCard")
426
+ sys.argv.append("--localhost")
424
427
  sys.exit(main())
425
428
  except KeyboardInterrupt:
426
429
  print("\nExiting from main...")
fastled/compile_server.py CHANGED
@@ -12,6 +12,8 @@ _DEFAULT_CONTAINER_NAME = "fastled-wasm-compiler"
12
12
 
13
13
  SERVER_PORT = 9021
14
14
 
15
+ SERVER_OPTIONS = ["--allow-shutdown", "--no-auto-update"]
16
+
15
17
 
16
18
  def find_available_port(start_port: int = SERVER_PORT) -> int:
17
19
  """Find an available port starting from the given port."""
@@ -130,8 +132,9 @@ class CompileServer:
130
132
  if self.interactive:
131
133
  server_command = ["/bin/bash"]
132
134
  else:
133
- server_command = ["python", "/js/run.py", "server", "--allow-shutdown"]
134
- print(f"Started Docker container with command: {server_command}")
135
+ server_command = ["python", "/js/run.py", "server"] + SERVER_OPTIONS
136
+ server_cmd_str = subprocess.list2cmdline(server_command)
137
+ print(f"Started Docker container with command: {server_cmd_str}")
135
138
  ports = {port: 80}
136
139
  volumes = None
137
140
  if self.fastled_src_dir:
@@ -141,10 +144,6 @@ class CompileServer:
141
144
  volumes = {
142
145
  str(self.fastled_src_dir): {"bind": "/host/fastled/src", "mode": "ro"}
143
146
  }
144
- if not self.interactive:
145
- # no auto-update because the source directory is mapped in.
146
- # This should be automatic now.
147
- server_command.append("--no-auto-update") # stop git repo updates.
148
147
  self.running_process = self.docker.run_container(
149
148
  server_command, ports=ports, volumes=volumes, tty=self.interactive
150
149
  )
fastled/keyboard.py CHANGED
@@ -1,89 +1,91 @@
1
- import os
2
- import select
3
- import sys
4
- import time
5
- from multiprocessing import Process, Queue
6
- from queue import Empty
7
-
8
-
9
- class SpaceBarWatcher:
10
- def __init__(self) -> None:
11
- self.queue: Queue = Queue()
12
- self.queue_cancel: Queue = Queue()
13
- self.process = Process(target=self._watch_for_space)
14
- self.process.start()
15
-
16
- def _watch_for_space(self) -> None:
17
- # Set stdin to non-blocking mode
18
- fd = sys.stdin.fileno()
19
- if os.name != "nt": # Unix-like systems
20
- import termios
21
- import tty
22
-
23
- old_settings = termios.tcgetattr(fd) # type: ignore
24
- try:
25
- tty.setraw(fd) # type: ignore
26
- while True:
27
- # Check for cancel signal
28
- try:
29
- self.queue_cancel.get(timeout=0.1)
30
- break
31
- except Empty:
32
- pass
33
-
34
- # Check if there's input ready
35
- if select.select([sys.stdin], [], [], 0.1)[0]:
36
- char = sys.stdin.read(1)
37
- if char == " ":
38
- self.queue.put(ord(" "))
39
- finally:
40
- termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) # type: ignore
41
- else: # Windows
42
- import msvcrt
43
-
44
- while True:
45
- # Check for cancel signal
46
- try:
47
- self.queue_cancel.get(timeout=0.1)
48
- break
49
- except Empty:
50
- pass
51
-
52
- # Check if there's input ready
53
- if msvcrt.kbhit():
54
- char = msvcrt.getch().decode()
55
- if char == " ":
56
- self.queue.put(ord(" "))
57
-
58
- def space_bar_pressed(self) -> bool:
59
- found = False
60
- while not self.queue.empty():
61
- key = self.queue.get()
62
- if key == ord(" "):
63
- found = True
64
- return found
65
-
66
- def stop(self) -> None:
67
- self.queue_cancel.put(True)
68
- self.process.terminate()
69
- self.process.join()
70
- self.queue.close()
71
- self.queue.join_thread()
72
-
73
-
74
- def main() -> None:
75
- watcher = SpaceBarWatcher()
76
- try:
77
- while True:
78
- if watcher.space_bar_pressed():
79
- break
80
- time.sleep(1)
81
- finally:
82
- watcher.stop()
83
-
84
-
85
- if __name__ == "__main__":
86
- try:
87
- main()
88
- except KeyboardInterrupt:
89
- print("Keyboard interrupt detected.")
1
+ import os
2
+ import select
3
+ import sys
4
+ import time
5
+ from multiprocessing import Process, Queue
6
+ from queue import Empty
7
+
8
+
9
+ class SpaceBarWatcher:
10
+ def __init__(self) -> None:
11
+ self.queue: Queue = Queue()
12
+ self.queue_cancel: Queue = Queue()
13
+ self.process = Process(target=self._watch_for_space)
14
+ self.process.start()
15
+
16
+ def _watch_for_space(self) -> None:
17
+ # Set stdin to non-blocking mode
18
+ fd = sys.stdin.fileno()
19
+
20
+ if os.name == "nt": # Windows
21
+ import msvcrt
22
+
23
+ while True:
24
+ # Check for cancel signal
25
+ try:
26
+ self.queue_cancel.get(timeout=0.1)
27
+ break
28
+ except Empty:
29
+ pass
30
+
31
+ # Check if there's input ready
32
+ if msvcrt.kbhit(): # type: ignore
33
+ char = msvcrt.getch().decode() # type: ignore
34
+ if char == " ":
35
+ self.queue.put(ord(" "))
36
+
37
+ else: # Unix-like systems
38
+ import termios
39
+ import tty
40
+
41
+ old_settings = termios.tcgetattr(fd) # type: ignore
42
+ try:
43
+ tty.setraw(fd) # type: ignore
44
+ while True:
45
+ # Check for cancel signal
46
+ try:
47
+ self.queue_cancel.get(timeout=0.1)
48
+ break
49
+ except Empty:
50
+ pass
51
+
52
+ # Check if there's input ready
53
+ if select.select([sys.stdin], [], [], 0.1)[0]:
54
+ char = sys.stdin.read(1)
55
+ if char == " ":
56
+ self.queue.put(ord(" "))
57
+ finally:
58
+ termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) # type: ignore
59
+
60
+ def space_bar_pressed(self) -> bool:
61
+ found = False
62
+ while not self.queue.empty():
63
+ key = self.queue.get()
64
+ if key == ord(" "):
65
+ found = True
66
+ return found
67
+
68
+ def stop(self) -> None:
69
+ self.queue_cancel.put(True)
70
+ self.process.terminate()
71
+ self.process.join()
72
+ self.queue.close()
73
+ self.queue.join_thread()
74
+
75
+
76
+ def main() -> None:
77
+ watcher = SpaceBarWatcher()
78
+ try:
79
+ while True:
80
+ if watcher.space_bar_pressed():
81
+ break
82
+ time.sleep(1)
83
+ finally:
84
+ watcher.stop()
85
+
86
+
87
+ if __name__ == "__main__":
88
+ try:
89
+ main()
90
+ except KeyboardInterrupt:
91
+ print("Keyboard interrupt detected.")
fastled/web_compile.py CHANGED
@@ -89,7 +89,7 @@ class ZipResult:
89
89
  error: str | None
90
90
 
91
91
 
92
- def zip_files(directory: Path) -> ZipResult | Exception:
92
+ def zip_files(directory: Path, build_mode: BuildMode) -> ZipResult | Exception:
93
93
  print("Zipping files...")
94
94
  try:
95
95
  files = get_sketch_files(directory)
@@ -119,6 +119,12 @@ def zip_files(directory: Path) -> ZipResult | Exception:
119
119
  has_embedded_zip = True
120
120
  else:
121
121
  zip_file.write(file_path, achive_path)
122
+ # write build mode into the file as build.txt so that sketches are fingerprinted
123
+ # based on the build mode. Otherwise the same sketch with different build modes
124
+ # will have the same fingerprint.
125
+ zip_file.writestr(
126
+ str(Path("wasm") / "build_mode.txt"), build_mode.value
127
+ )
122
128
  result = ZipResult(
123
129
  zip_bytes=zip_buffer.getvalue(),
124
130
  zip_embedded_bytes=(
@@ -133,15 +139,15 @@ def zip_files(directory: Path) -> ZipResult | Exception:
133
139
 
134
140
 
135
141
  def find_good_connection(
136
- urls: list[str], filter_out_bad=False
142
+ urls: list[str], filter_out_bad=True, use_ipv6: bool = True
137
143
  ) -> ConnectionResult | None:
138
144
  futures: list[Future] = []
139
- ip_versions = [True, False]
140
- # Start all connection tests
141
- for ipv4 in ip_versions:
142
- for url in urls:
143
- f = _EXECUTOR.submit(_test_connection, url, ipv4)
144
- futures.append(f)
145
+ for url in urls:
146
+ f = _EXECUTOR.submit(_test_connection, url, use_ipv4=True)
147
+ futures.append(f)
148
+ if use_ipv6:
149
+ f_v6 = _EXECUTOR.submit(_test_connection, url, use_ipv4=False)
150
+ futures.append(f_v6)
145
151
 
146
152
  try:
147
153
  # Return first successful result
@@ -164,11 +170,12 @@ def web_compile(
164
170
  profile: bool = False,
165
171
  ) -> WebCompileResult:
166
172
  host = _sanitize_host(host or DEFAULT_HOST)
173
+ build_mode = build_mode or BuildMode.QUICK
167
174
  print("Compiling on", host)
168
175
  auth_token = auth_token or _AUTH_TOKEN
169
176
  if not directory.exists():
170
177
  raise FileNotFoundError(f"Directory not found: {directory}")
171
- zip_result = zip_files(directory)
178
+ zip_result = zip_files(directory, build_mode=build_mode)
172
179
  if isinstance(zip_result, Exception):
173
180
  return WebCompileResult(
174
181
  success=False, stdout=str(zip_result), hash_value=None, zip_bytes=b""
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.1
2
+ Name: fastled
3
+ Version: 1.0.15
4
+ Summary: FastLED Wasm Compiler
5
+ Home-page: https://github.com/zackees/fastled-wasm
6
+ Maintainer: Zachary Vorhies
7
+ License: BSD 3-Clause License
8
+ Keywords: template-python-cmd
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: docker
14
+ Requires-Dist: httpx
15
+ Requires-Dist: watchdog
16
+ Requires-Dist: livereload
17
+ Requires-Dist: download
18
+ Requires-Dist: filelock
19
+
20
+ # FastLED Wasm compiler
21
+
22
+ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
23
+
24
+
25
+ [![Linting](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
26
+ [![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)
27
+ [![MacOS_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
28
+ [![Ubuntu_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
29
+ [![Win_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
30
+
31
+
32
+ # About
33
+
34
+ This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
35
+
36
+ Compile times are extremely fast, thanks to aggressive object caching for C++ and sketch fingerprinting with a zip file cache. Recompilation of sketch files with minimal changes will occure in less than a second.
37
+
38
+ By default the web compiler will always be used unless that user specifies `--local`, in which case this compiler will invoke docker to bring in a runtime necessary to run the compiler toolchain.
39
+
40
+ The local compiler will be much faster than the web version in most circumstances after the first compile. The web compiler
41
+ has the advantage that as a persistant service the compile cache will remain much more up to date.
42
+
43
+
44
+ https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
45
+
46
+ # Demo
47
+
48
+ https://zackees.github.io/fastled-wasm/
49
+
50
+
51
+
52
+ # Install
53
+
54
+ ```bash
55
+ pip install fastled
56
+ ```
57
+
58
+ **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.**
59
+
60
+ # Use
61
+
62
+ Change to the directory where the sketch lives and run, will run the compilation
63
+ on the web compiler.
64
+
65
+ ```bash
66
+ cd <SKETCH-DIRECTORY>
67
+ fastled
68
+ ```
69
+
70
+ Or if you have docker you can run a server automatically.
71
+
72
+ ```bash
73
+ cd <SKETCH-DIRECTORY>
74
+ fastled --local
75
+ ```
76
+
77
+ You can also spawn a server in one process and then access it in another, like this:
78
+
79
+ ```bash
80
+ fastled --server
81
+ # now launch the client
82
+ fastled examples/wasm --local
83
+ ```
84
+
85
+ After compilation a web browser windows will pop up. Changes to the sketch will automatically trigger a recompilation.
86
+
87
+ # Hot reload by default
88
+
89
+ Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
90
+
91
+ This style of development should be familiar to those doing web development.
92
+
93
+ # Hot Reload for working with the FastLED repo
94
+
95
+ If you launch `fastled` in the FastLED repo then this tool will automatically detect this and map the src directory into the
96
+ host container. Whenever there are changes in the source code from the mapped directory, then these will be re-compiled
97
+ on the next change or if you hit the space bar when prompted. Unlike a sketch folder, a re-compile on the FastLED src
98
+ can be much longer, for example if you modify a header file.
99
+
100
+ # Data
101
+
102
+ Huge blobs of data like video will absolutely kill the compile performance as these blobs would normally have to be shuffled
103
+ back and forth. Therefore a special directory `data/` is implicitly used to hold this blob data. Any data in this directory
104
+ will be replaced with a stub containing the size and hash of the file during upload. On download these stubs are swapped back
105
+ with their originals.
106
+
107
+ The wasm compiler will also recongize all files in the `data/` directory and generate a `files.json` manifest and can be used
108
+ in your wasm sketch using an emulated SD card system mounted at `/data/` on the SD Card. In order to increase load speed, these
109
+ files will be asynchroniously streamed into the running sketch instance during runtime. The only caveat here is that although these files will be available during the setup() phase of the sketch, they will not be fully hydrated, so if you do a seek(end) of these files the results are undefined.
110
+
111
+ For an example of how to use this see `examples/SdCard` which is fully wasm compatible.
112
+
113
+ # Compile Speed
114
+
115
+ 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.
116
+
117
+ 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.
118
+
119
+ 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.
120
+
121
+ Simple syntax errors will be caught by the pre-processing step. This happens without a lock to reduce the single lock bottleneck.
122
+
123
+ # Sketch Cache
124
+
125
+ Sketchs are aggresively 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
126
+ printing while the actual source files are sent to compiler to preserve line numbers and file names.
127
+
128
+ 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.
129
+
130
+ # Local compiles
131
+
132
+ 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.
133
+
134
+ # Auto updates
135
+
136
+ 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.
137
+
138
+ ### Wasm compatibility with Arduino sketchs
139
+
140
+ 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.
141
+
142
+ ### Faqs
143
+
144
+ Q: How often is the docker image updated?
145
+ A: It's scheduled for rebuild once a day at 3am Pacific time, and also on every change to this repo.
146
+
147
+ Q: How can I run my own cloud instance of the FastLED wasm compiler?
148
+ A: Render.com (which fastled is hosted on) or DigialOcean can accept a github repo and auto-build the docker image.
149
+
150
+ Q: Why does FastLED tend to become choppy when the browser is in the background?
151
+ 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.
152
+
153
+ Q: Why does a long `delay()` cause the browser to freeze and become sluggish?
154
+ 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.
155
+
156
+
157
+ Q: How can I get the compiled size of my FastLED sketch smaller?
158
+ 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.
159
+
160
+
161
+ # Revisions
162
+
163
+ * 1.1.15 - Fixed logic for considering ipv6 addresses. Auto selection of ipv6 is now restored.
164
+ * 1.1.14 - Fixes for regression in using --server and --localhost as two instances, this is now under test.
165
+ * 1.1.13 - Disable the use of ipv6. It produces random timeouts on the onrender server we are using for the web compiler.
166
+ * 1.1.12 - By default, fastled will default to the web compiler. `--localhost` to either attach to an existing server launched with `--server` or else one will be created automatically and launched.
167
+ * 1.1.11 - Dev improvement: FastLED src code volume mapped into docker will just in time update without having to manually trigger it.
168
+ * 1.1.10 - Swap large assets with embedded placeholders. This helps video sketches upload and compile instantly. Assets are re-added on after compile artifacts are returned.
169
+ * 1.1.9 - Remove auto server and instead tell the user corrective action to take.
170
+ * 1.1.8 - Program now knows it's own version which will be displayed with help file. Use `--version` to get it directly.
171
+ * 1.1.7 - Sketch cache re-enabled, but selectively invalidated on cpp/h updates. Cleaned up deprecated args. Fixed double thread running for containers that was causing slowdown.
172
+ * 1.1.6 - Use the fast src volume map allow quick updates to fastled when developing on the source code.
173
+ * 1.1.5 - Filter out hidden files and directories from being included in the sketch archive sent to the compiler.
174
+ * 1.1.4 - Fix regression introduced by testing out ipv4/ipv6 connections from a thread pool.
175
+ * 1.1.3 - Live editing of *.h and *.cpp files is now possible. Sketch cache will be disabled in this mode.
176
+ * 1.1.2 - `--server` will now volume map fastled src directory if it detects this. This was also implemented on the docker side.
177
+ * 1.1.1 - `--interactive` is now supported to debug the container. Volume maps and better compatibilty with ipv4/v6 by concurrent connection finding.
178
+ * 1.1.0 - Use `fastled` as the command for the wasm compiler.
179
+ * 1.0.17 - Pulls updates when necessary. Removed dependency on keyring.
180
+ * 1.0.16 - `fastled-wasm` package name has been changed to `fled`
181
+ * 1.0.15 - `fled` is an alias of `fastled-wasm` and will eventually replace it. `--web-host` was folded into `--web`, which if unspecified will attempt to run a local docker server and fallback to the cloud server if that fails. Specifying `--web` with no arguments will default to the cloud server while an argument (like `localhost`) will cause it to bind to that already running server for compilation.
182
+ * 1.0.14 - For non significant changes (comments, whitespace) in C++/ino/*.h files, compilation is skipped. This significantly reduces load on the server and prevents unnecessary local client browser refreshes.
183
+ * 1.0.13 - Increase speed of local compiles by running the server version of the compiler so it can keep it's cache and not have to pay docker startup costs because now it's a persistant server until exit.
184
+ * 1.0.12 - Added suppport for compile modes. Pass in `--release`, `--quick`, `--debug` for different compile options. We also support `--profile` to profile the build process.
185
+ * 1.0.11 - `--web` compile will automatically be enabled if the local build using docker fails.
186
+ * 1.0.10 - Watching files is now available for `--web`
187
+ * 1.0.9 - Enabled web compile. Access it with `--web` or `--web-host`
188
+ * 1.0.8 - Allow more than one fastled-wasm browser instances to co-exist by searching for unused ports after 8081.
189
+ * 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
190
+ * 1.0.6 - Removed `--no-open` and `--watch`, `--watch` is now assumed unless `--just-compile` is used.
191
+ * 1.0.5 - Implemented `--update` to update the compiler image from the docker registry.
192
+ * 1.0.4 - Implemented `--watch` which will watch for changes and then re-launch the compilation step.
193
+ * 1.0.3 - Integrated `live-server` to launch when available.
194
+ * 1.0.2 - Small bug with new installs.
195
+ * 1.0.1 - Re-use is no longer the default, due to problems.
196
+ * 1.0.0 - Initial release.
@@ -1,20 +1,20 @@
1
- fastled/__init__.py,sha256=XO4EYoMURe1bnLz9dzABggQ31idNxZwqUDWnM5CR1oY,64
2
- fastled/app.py,sha256=VB_uJDrFDvPgJuPh8crntWztKteWmHp5porqNSCCXu4,14949
1
+ fastled/__init__.py,sha256=zQpKt-iwGAnHw59eTxrM5GT1LFsHFobeuFTRsfgMaAI,64
2
+ fastled/app.py,sha256=fKIpWYKed8ENfPrWD0jFXZJfh6E4D9_W2xB3w0xgr7o,15054
3
3
  fastled/build_mode.py,sha256=joMwsV4K1y_LijT4gEAcjx69RZBoe_KmFmHZdPYbL_4,631
4
4
  fastled/cli.py,sha256=CNR_pQR0sNVPNuv8e_nmm-0PI8sU-eUBUgnWgWkzW9c,237
5
- fastled/compile_server.py,sha256=Om9fFpg9Yx4_WJDC_pG5-tYtAwreKrEAx-k8dJQBkJs,8146
5
+ fastled/compile_server.py,sha256=baXSd8V3C2tA--oYl8-_TPEvJxtNYck788W-iT-xyi8,8022
6
6
  fastled/docker_manager.py,sha256=gaDZpFV7E-9JhYIn6ahkP--9dGT32-WR5wZaU-o--6g,9107
7
7
  fastled/filewatcher.py,sha256=fJNMQRDCpihSL4nQeYPqbD4m1Jzjcz_-YRAo-wlPW6k,6518
8
- fastled/keyboard.py,sha256=PiAUhga8R_crMqFQRwjKyg6bgVTMlpezWa0gaGmL_So,2542
8
+ fastled/keyboard.py,sha256=vlyJDae9yOHkGQ0R1RgYwNCIafg5lslGZ_41Jz_EC1g,2667
9
9
  fastled/open_browser.py,sha256=RRHcsZ5Vzsw1AuZUEYuSfjKmf_9j3NGMDUR-FndHmqs,1483
10
10
  fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
11
11
  fastled/sketch.py,sha256=KhhPFqlFVlBk8YrzFy7-ioe7zEzecgrVLhyFbLpBp7k,1845
12
12
  fastled/util.py,sha256=t4M3NFMhnCzfYbLvIyJi0RdFssZqbTN_vVIaej1WV-U,265
13
- fastled/web_compile.py,sha256=RqHGiG9ZV3siQVhnQ8Ff7p-5aUKCwQWdoxs-zk7ItDE,10149
13
+ fastled/web_compile.py,sha256=PfNTYazlFCJhJxYGsBsv4HaLVIvmF-rPSc1NE9gIaPo,10674
14
14
  fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
15
- fastled-1.0.12.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
16
- fastled-1.0.12.dist-info/METADATA,sha256=fpErTM2GXagl_3JPvnrw8b3SUIJ6jeTPa-QFkTilAfc,6919
17
- fastled-1.0.12.dist-info/WHEEL,sha256=0VNUDWQJzfRahYI3neAhz2UVbRCtztpN5dPHAGvmGXc,109
18
- fastled-1.0.12.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
19
- fastled-1.0.12.dist-info/top_level.txt,sha256=xfG6Z_ol9V5YmBROkZq2QTRwjbS2ouCUxaTJsOwfkOo,14
20
- fastled-1.0.12.dist-info/RECORD,,
15
+ fastled-1.0.15.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
16
+ fastled-1.0.15.dist-info/METADATA,sha256=30X9yHNZlNBJ_MpRQ5722V7Yu2aqgNEwcQvXcZkjXgI,13230
17
+ fastled-1.0.15.dist-info/WHEEL,sha256=0VNUDWQJzfRahYI3neAhz2UVbRCtztpN5dPHAGvmGXc,109
18
+ fastled-1.0.15.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
19
+ fastled-1.0.15.dist-info/top_level.txt,sha256=xfG6Z_ol9V5YmBROkZq2QTRwjbS2ouCUxaTJsOwfkOo,14
20
+ fastled-1.0.15.dist-info/RECORD,,
@@ -1,125 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: fastled
3
- Version: 1.0.12
4
- Summary: FastLED Wasm Compiler
5
- Home-page: https://github.com/zackees/fastled-wasm
6
- Maintainer: Zachary Vorhies
7
- License: BSD 3-Clause License
8
- Keywords: template-python-cmd
9
- Classifier: Programming Language :: Python :: 3
10
- Requires-Python: >=3.7
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: docker
14
- Requires-Dist: httpx
15
- Requires-Dist: watchdog
16
- Requires-Dist: livereload
17
- Requires-Dist: download
18
- Requires-Dist: filelock
19
-
20
- # FastLED wasm compiler
21
-
22
- Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
23
-
24
-
25
- [![Linting](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
26
- [![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)
27
- [![MacOS_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
28
- [![Ubuntu_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
29
- [![Win_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
30
-
31
-
32
- # About
33
-
34
- This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
35
-
36
- Compile times are extremely fast - I've seen as low as 5 seconds but 8-15 seconds is typical.
37
-
38
- This works on Windows/Linux/Mac(arm/x64).
39
-
40
- Docker is required.
41
-
42
- https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
43
-
44
- # Demo
45
-
46
- https://zackees.github.io/fastled-wasm/
47
-
48
-
49
-
50
- # Install
51
-
52
- ```bash
53
- pip install fastled-wasm
54
- ```
55
-
56
- **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.**
57
-
58
- # Use
59
-
60
- Change to the directory where the sketch lives and run
61
-
62
- ```bash
63
- cd <SKETCH-DIRECTORY>
64
- fastled-wasm
65
- ```
66
-
67
- Or if you don't have docker then use our web compiler
68
-
69
- ```bash
70
- cd <SKETCH-DIRECTORY>
71
- fastled-wasm --web
72
- ```
73
-
74
- After compilation a web browser windows will pop up.
75
-
76
- # Hot reload by default
77
-
78
- Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
79
-
80
- This style of development should be familiar to those doing web development.
81
-
82
- # Data
83
-
84
- 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.
85
-
86
-
87
- ### About the compilation.
88
-
89
- Pre-processing is done to your source files. A fake Arduino.h will be inserted into your source files that will
90
- provide shims for most of the common api points.
91
-
92
-
93
- # Revisions
94
-
95
- * 1.1.12 - By default, fastled will default to the web compiler. `--localhost` to either attach to an existing server launched with `--server` or else one will be created automatically and launched.
96
- * 1.1.11 - Dev improvement: FastLED src code volume mapped into docker will just in time update without having to manually trigger it.
97
- * 1.1.10 - Swap large assets with embedded placeholders. This helps video sketches upload and compile instantly. Assets are re-added on after compile artifacts are returned.
98
- * 1.1.9 - Remove auto server and instead tell the user corrective action to take.
99
- * 1.1.8 - Program now knows it's own version which will be displayed with help file. Use `--version` to get it directly.
100
- * 1.1.7 - Sketch cache re-enabled, but selectively invalidated on cpp/h updates. Cleaned up deprecated args. Fixed double thread running for containers that was causing slowdown.
101
- * 1.1.6 - Use the fast src volume map allow quick updates to fastled when developing on the source code.
102
- * 1.1.5 - Filter out hidden files and directories from being included in the sketch archive sent to the compiler.
103
- * 1.1.4 - Fix regression introduced by testing out ipv4/ipv6 connections from a thread pool.
104
- * 1.1.3 - Live editing of *.h and *.cpp files is now possible. Sketch cache will be disabled in this mode.
105
- * 1.1.2 - `--server` will now volume map fastled src directory if it detects this. This was also implemented on the docker side.
106
- * 1.1.1 - `--interactive` is now supported to debug the container. Volume maps and better compatibilty with ipv4/v6 by concurrent connection finding.
107
- * 1.1.0 - Use `fastled` as the command for the wasm compiler.
108
- * 1.0.17 - Pulls updates when necessary. Removed dependency on keyring.
109
- * 1.0.16 - `fastled-wasm` package name has been changed to `fled`
110
- * 1.0.15 - `fled` is an alias of `fastled-wasm` and will eventually replace it. `--web-host` was folded into `--web`, which if unspecified will attempt to run a local docker server and fallback to the cloud server if that fails. Specifying `--web` with no arguments will default to the cloud server while an argument (like `localhost`) will cause it to bind to that already running server for compilation.
111
- * 1.0.14 - For non significant changes (comments, whitespace) in C++/ino/*.h files, compilation is skipped. This significantly reduces load on the server and prevents unnecessary local client browser refreshes.
112
- * 1.0.13 - Increase speed of local compiles by running the server version of the compiler so it can keep it's cache and not have to pay docker startup costs because now it's a persistant server until exit.
113
- * 1.0.12 - Added suppport for compile modes. Pass in `--release`, `--quick`, `--debug` for different compile options. We also support `--profile` to profile the build process.
114
- * 1.0.11 - `--web` compile will automatically be enabled if the local build using docker fails.
115
- * 1.0.10 - Watching files is now available for `--web`
116
- * 1.0.9 - Enabled web compile. Access it with `--web` or `--web-host`
117
- * 1.0.8 - Allow more than one fastled-wasm browser instances to co-exist by searching for unused ports after 8081.
118
- * 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
119
- * 1.0.6 - Removed `--no-open` and `--watch`, `--watch` is now assumed unless `--just-compile` is used.
120
- * 1.0.5 - Implemented `--update` to update the compiler image from the docker registry.
121
- * 1.0.4 - Implemented `--watch` which will watch for changes and then re-launch the compilation step.
122
- * 1.0.3 - Integrated `live-server` to launch when available.
123
- * 1.0.2 - Small bug with new installs.
124
- * 1.0.1 - Re-use is no longer the default, due to problems.
125
- * 1.0.0 - Initial release.