No description
  • Nix 69%
  • TypeScript 31%
Find a file
Wei Wen Goh 5379769435 Precompile the desktop app at build time instead of running it with --hmr
The installed binary's cwd is whatever directory launched it (a
terminal's cwd, or $HOME from a .desktop entry), not the repo. --hmr
made deno recursively watch that directory, which choked when it
followed a Steam Proton prefix's Z: symlink (Wine maps it back to /)
into /var/lib/bluetooth and hit a permission error.

Beyond dropping --hmr, the runtime invocation was recompiling main.ts
from scratch into a .so on every single launch, which is not a
release build by any definition. Use `deno desktop --output` to
AOT-compile the app once, at package build time, into a standalone
binary+dylib pair, and have the installed bin/subwave-radio just exec
that. This also drops deno itself from the runtime closure entirely.

The compile step needs network (to fetch the deno runtime lib and the
laufey webview backend on first build), so it's a fixed-output
derivation with a pinned hash; verified the compiled app.so is
byte-for-byte reproducible given a fixed output path and source path,
so this hash is stable and will only need bumping when main.ts,
deno.json, or the nixpkgs deno/laufey versions change.
2026-08-10 02:48:28 +08:00
assets Install a .desktop entry and icon so Subwave Radio shows up in app launchers 2026-08-10 02:12:14 +08:00
.gitignore Add nix flake with an FHS dev shell so deno desktop's webview backend runs on NixOS, and fix the tune-in autoplay race 2026-08-10 02:03:48 +08:00
deno.json Add deno desktop wrapper that autoplays the subwave station and exposes MPRIS 2026-08-10 01:33:10 +08:00
flake.lock Add deno desktop wrapper that autoplays the subwave station and exposes MPRIS 2026-08-10 01:33:10 +08:00
flake.nix Precompile the desktop app at build time instead of running it with --hmr 2026-08-10 02:48:28 +08:00
main.ts Add nix flake with an FHS dev shell so deno desktop's webview backend runs on NixOS, and fix the tune-in autoplay race 2026-08-10 02:03:48 +08:00
subwave-openapi.json Add deno desktop wrapper that autoplays the subwave station and exposes MPRIS 2026-08-10 01:33:10 +08:00