Most macOS-style docks for Windows share the same problem: they wrap a browser engine (Electron or WebView2) and burn 150–300+ MB of RAM just to sit idle at the bottom of your screen.
I wanted a Windows 10/11 dock and morphing Dynamic Island that felt genuinely native, started instantly, and stayed completely out of the way when gaming or working. So I built ChalzDock in pure Rust — no Electron, no Chromium, no WebView2, and no .NET runtime.
Today it ships as a single ~2.55 MB standalone .exe under GPL-3.0. Here is how I designed it and the Win32/Direct2D tricks that keep it fast.
The Stack
Instead of reaching for a web UI framework, ChalzDock renders directly through Windows graphics APIs in Rust:
- Win32 for window management, global hotkeys, shell hooks, and app enumeration
- Direct2D & DirectWrite for crisp vector glass UI, icons, and typography
- DirectComposition (
WS_EX_NOREDIRECTIONBITMAP) for hardware-accelerated per-pixel alpha transparency - Single-binary release built reproducibly via GitHub Actions (
windows-latest) with SHA-256 checksums
5 Architecture Decisions That Kept It Light
1. Adaptive Frame Pacing (DwmFlush -> 55ms -> 100ms)
Running a constant 120 FPS render loop for a desktop shell wastes battery and GPU clocks. ChalzDock dynamically shifts its pacing loop:
- 60/120 Hz
DwmFlushVSync only while icon magnification springs, popup entrances, or drags are actively animating -
55ms(~18 FPS) when a live audio visualizer is active in the Dynamic Island -
100msMsgWaitForMultipleObjectsdeep idle sleep when the UI is static
2. 10-Second LazyPopup GPU Surface Reaping
ChalzDock has a lot of popups — Start Menu, Spotlight search, Bento Control Center, System Monitor & Storage Cleaner, 4-Column System Tray, Calendar & Focus Notes, Modern Run (Win+R), and Settings.
Keeping GPU swapchains alive for all of them permanently would bloat memory. Instead, each LazyPopup allocates its DirectComposition surface on first open and automatically releases it 10 seconds after closing. On a local Windows 11 sample (PrivateMemorySize64), that keeps cold idle around ~36 MB and active popups around ~52 MB.
3. Single-EXE Self-Hosted --watchdog for Taskbar Safety
One of the scariest things about custom Windows docks is hiding the native taskbar (Shell_TrayWnd): if the dock crashes or gets force-killed, you can end up stranded without a taskbar.
ChalzDock solves this without a separate helper binary. On launch, ChalzDock.exe spawns a second copy of itself with --watchdog (branching early before UI initialization):
- Uses ~1.8 MB private memory
- Blocks in a kernel
WaitForSingleObject(..., INFINITE)call (zero CPU usage) - If the main process crashes or exits unexpectedly, the watchdog immediately restores the native Windows taskbar state and exits cleanly
4. Zero-Allocation Smoked Obsidian & Liquid Glass Themes
In v0.1.5-beta and v0.1.6-beta, I added a dedicated Themes tab with Smoked Obsidian and Liquid Glass presets plus live Glass Tuning.
To avoid per-frame allocations in Direct2D, refractive linear gradient brushes (lg_panel_fill, lg_capsule_fill, lg_rim_stroke) are pre-allocated once and synchronized across all popup surfaces whenever you adjust tint or switch themes.
5. Non-Blocking Background Workers & Fullscreen Game Guard
Nothing heavy runs on the UI thread:
- Media (GSMTC): Polls active playback across Spotify, Apple Music, and browsers with active-playing priority
- Audio (WASAPI): Per-app volume controls and output device switching
- App Discovery (
v0.1.7-beta): Enumerates both classic Win32 shortcuts andFOLDERID_AppsFolderso Microsoft Store & MSIX apps appear natively in Start Menu and Spotlight - Game-Mode Guard: Detects true fullscreen apps/games and suppresses non-critical animations and Dynamic Island popups so your frame pacing stays untouched
High-Level Architecture
ChalzDock.exe ├── --watchdog mode -> Early branch · WaitForSingleObject(INFINITE) · Restores Shell_TrayWnd on crash └── Main UI thread ├── Win32 Event Loop (Adaptive DwmFlush VSync / 100ms idle MsgWait) ├── DirectComposition (Dock Bar, Morphing Dynamic Island, 10s LazyPopups) ├── Physics Springs (Cosine-falloff magnification + spring convergence) └── Background Workers ├── Media (GSMTC active session priority) ├── Audio (WASAPI per-app volume + endpoints) ├── Shelf (Clipboard + OLE drag/drop staging) ├── System Monitor & Safe Storage Cleaner └── Windows Toast Notification Listener -> Dynamic Island What Shipping 7 Beta Releases Taught Me
- Always build crash recovery first when touching the Windows shell. A tiny kernel-wait watchdog turns taskbar replacement from terrifying into rock-solid.
- Real hardware tests beat assumptions. LCD brightness needed native IOCTL calls with WMI fallback, and Wi-Fi auth needed temporary
WlanConnectprofiles with volatile memory wiping of credential buffers afterward. - Self-updating matters for solo desktop apps. Adding a one-click in-place updater (
v0.1.3-beta) with SHA-256 verification, automatic restart, and rollback made shippingv0.1.4throughv0.1.7painless for testers.
Try It Out
ChalzDock is completely free, open-source (GPL-3.0), and local-first (zero telemetry or analytics):
- Website & Download: chalzdock.vercel.app
- GitHub Repository: github.com/chals1029/ChalzDock
- Latest Release (
v0.1.7-beta): GitHub Releases
If you have built native Windows shells with Rust, Direct2D, or DirectComposition — or if you try ChalzDock and find rough edges — I would love to hear your feedback in the comments!