Skip to content

feat: download Queueify as a 21 MB exe compiled to native code - #2

Merged
PAumedes merged 5 commits into
mainfrom
feat/native-aot
Oct 14, 2026
Merged

PAumedes merged 5 commits into
mainfrom
feat/native-aot

Conversation

@PAumedes

@PAumedes PAumedes commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

What and why

The smallest portable single exe that needs nothing installed: the app is compiled ahead of time (Native AOT) and appended to a small starter exe, Brotli-compressed. ~21 MB, down from 35 MB (1.2.0) and 93 MB (1.1.0). The starter unpacks it once per version into %LOCALAPPDATA%\Queueify\app and starts it. Measurements and alternatives: ADR-0008.

Also: the lines of a magazine photo are buttons now (keyboard and screen readers), and the settings lists use compiled bindings.

How it was tested

  • Tests first (Bundle, StartedExe, RelaunchCommand, list item names, release projects; UI: photo lines; package.ps1: taskbar pin, dll loading)
  • dotnet test: 211 passed with the Firestore emulator, 0 skipped
  • UI tests and sync UI test against the download itself (dist\Queueify\Queueify.exe, the starter): 0 failures
  • package.ps1 smoke: starts under another name from an empty folder, data in local app data, taskbar pin → the download, starter imports from System32 only
  • Windows Defender scan of the exe: no threats

Review

  • Adversarial review: round 1 found two majors (a double start on first run broke the running copy; a damaged download installed a broken version for good) and five minors, all fixed test-first; round 2: APPROVE. Two of its leftover nits are fixed too (check before unpacking, tidy abandoned copies).
  • Docs: README, CONTRIBUTING (C++ build tools), ARCHITECTURE, TESTING, RELEASING, SECURITY, CLAUDE.md, ADR-0008

DisplayMemberPath looks the property up at run time, which Native AOT
can't do. The country and text recognition lists use {x:Bind} templates,
and their items read as their names for screen readers.
The highlighted lines on a photo were plain shapes that only took a mouse
click. They are buttons now: Tab reaches them, Enter or Space picks one,
and screen readers read the line. They look as before. A UI test pastes
the test photo and picks a line.
The app is compiled ahead of time (Native AOT), so no .NET runtime ships
with it, and the published folder is appended to a small starter exe,
compressed with Brotli: 21 MB, down from 35 MB in 1.2.0 and 93 MB in
1.1.0. The starter unpacks it once per version into
%LOCALAPPDATA%\Queueify\app, starts it and removes older versions.

- WinUI reads lists only when their WinRT interop code was generated at
  build time: every ItemsSource gets a List<object> made in the app, and
  unsafe code is allowed so the generator doesn't skip lists
- the app knows the exe the user opened (QUEUEIFY_EXE), so portable Data
  next to it still works and a taskbar pin starts the download, not the
  unpacked copy the next version removes
- the starter loads its own imports from System32 only
- package.ps1 checks the start under another name, where the data goes,
  the taskbar pin and the starter's dll loading; the UI tests run the
  download itself with a scratch LOCALAPPDATA

ADR-0008 records the measurements and the alternatives.
- the archive is checked against its SHA-256 id while it unpacks: Brotli
  has no checksum, and a damaged download would have installed a broken
  version for good; it now says "damaged, download it again"
- a complete folder is never deleted: starting the exe twice on the
  first run no longer breaks the copy that's already running
- clean-up leaves another version's unpacking in progress alone
- the starter catches every error, words them itself (no resource keys),
  and a clean-up failure no longer reads as a failed start
- the app's working folder is its own, not the download's
- QUEUEIFY_EXE must name an existing exe and is cleared after reading, so
  programs Queueify opens don't inherit it; restarts go through the starter
The archive's hash is checked before anything is written, so any damage
gets "download it again". Clean-up also removes this version's own
copies abandoned more than an hour ago.
@PAumedes
PAumedes marked this pull request as ready for review October 14, 2026 02:16
@PAumedes
PAumedes merged commit e5003d7 into main Oct 14, 2026
1 check passed
@PAumedes
PAumedes deleted the feat/native-aot branch October 14, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant