Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 03:27
· 88 commits to main since this release

QuickWin v2.0.0 — declarative FFI rewrite

This major release replaces libffi with built-in assembly call stubs and rebuilds the FFI surface as a declarative, type-checked API. Code written against the 1.x FFI API will not work unchanged on 2.x — hence the semver major.

123 files changed, +12615 / −2253 since v1.3.0.

⚠️ Breaking Changes

  • libffi removed — bind() now dispatches through built-in asm call stubs; the libffi dependency and its API are gone.
  • Struct syntax flattened — nested builder calls replaced by plain object literals with string sugar; layout runs on a CType IR with MSVC-compatible lowering.
  • u64 / i64 unified as bigint — 64-bit integers are always bigint, on every platform.
  • Token vocabulary tightened — typedef aliases and Norm dropped; the kind vocabulary is single-sourced.
  • Direction-split codecs — encode / decode / alloc split by direction; struct codecs return PtrArrayBuffer (zero-initialized).
  • Branded handles and NULL — handle pointer slots across structs, .d.ts and kernel32 are branded; NULL is branded per pointer type.
  • Bindings regrouped under lib/windows/ — user32 / kernel32 / gdi32 / comdlg32 / shell32 / ole32 / ntdll modules, with struct definitions centralized in lib/windows/structs.ts.

Added

  • Closures — JS callbacks as native function pointers, including ia32 64-bit integer returns.
  • Bitfields — MSVC layout rules.
  • Unions, typed pointers, NUL-terminated strings.
  • Declarative bind/struct FFI — named <NAME>ptr layouts, alloc() out-params, arrayOf, tuple-typed fixed arrays.
  • Codec encode / decode / alloc plus curated user32 bindings.
  • Token modifiers — ! non-null and @Enum value domains.
  • exec_server — GUI log window, token auth, --nogui headless mode; window enumeration and screenshot capture (clamped to screen); kills subprocess on disconnect with optional per-request timeout; win11 cmd /u keeps UTF-16 output lossless.
  • TLS certificate verification for fetch / WebSocket / import(https).
  • HTTP server — streaming ReadableStream response bodies, trailing headers on chunked responses, client disconnect surfaced via AbortSignal.
  • fetch — recognizes the Trailer footer when completing chunked responses.
  • Win11 VM — version-numbered ports and a CI matrix entry (currently disabled; enable by uncommenting).

Fixed

  • DeepPartial no longer recurses into primitive brand types.
  • Hardened bitfields, closure bounds checks and bindLib generics.
  • 64-bit window handles written without JS bit-shift wraparound (exec_server).
  • SMB: oplocks disabled in smb_wrapper to stop stale guest reads.
  • Stale winpty references removed after the CreateProcess + CreatePipe exec rewrite.

Docs

  • FFI notes: ! modifier cost, node:ffi gap (73–424×), callPacked attribution (90% in the JS layer).
  • JSDoc @param args_N on binding parameters; binding JSDoc deduplicated.
  • exec_server article and architecture notes; dev-docs overhaul.

Full diff: v1.3.0...v2.0.0


Assets

File Notes
qwin.exe x64 (Win7+)
qwin-x86.exe x86 / XP
qwin-nowasm.exe x64, no WASM
qwin-nowasm-x86.exe x86, no WASM
main.js bundled JS entry
quickwin-2.0.0.tgz npm tarball (also on npm as quickwin@2.0.0)