Remove blocking code and spawn_blocking

Rayhunter uses a mixture of spawn and spawn_blocking, then also does
some blocking operations inside of async code.

Move everything to async. This allows us to use the single-threaded
runtime.

Now the binary is 100kB smaller, and the memory usage also improved by
~100kB on tplink.
This commit is contained in:
Markus Unterwaditzer
2025-07-25 14:18:44 +02:00
committed by Will Greenberg
parent 9694aa826b
commit f8824ce7e7
10 changed files with 88 additions and 77 deletions
Generated
+1
View File
@@ -2422,6 +2422,7 @@ name = "rayhunter-daemon"
version = "0.5.0"
dependencies = [
"anyhow",
"async-trait",
"async_zip",
"axum",
"chrono",