I built Cremeplay, a YouTube Music desktop client in Rust and Tauri that uses ~60MB RAM
说明与用途
Cremeplay 是使用 Rust 和 Tauri 构建的轻量级 YouTube Music 客户端,后台使用约 60 MB RAM,窗口打开时约 150 MB,采用直接 Innertube API、工作集清理和 Windows Job Object 进程分组实现。
问题
Most YouTube Music desktop apps built on Electron or heavy web wrappers consume 500–800 MB of RAM, leaving background processes and large buffers in memory.
结果
Cremeplay achieves a ~60 MB RAM footprint in background and ~150 MB with an open window, compared to 400–800 MB for Electron wrappers, while providing full YouTube Music discovery, SponsorBlock, Discord Rich Presence, and OBS Tuna integration.
工作流
- Built a Rust Innertube client to avoid loading the Google Polymer web app
- Implemented recursive working set trimming via K32EmptyWorkingSet to drop stale memory pages
- Bundled WebView2 child processes into a Windows Job Object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
- Hooked into IAudioSessionManager2/IAudioSessionControl to label the audio stream as Cremeplay
证据
Most YouTube Music desktop apps are built on Electron or heavy web wrappers. Every time I had Pear Desktop or a browser wrapper open in the background while working or gaming, it was sitting at 500 MB to 800 MB of RAM just to play audio.
I built Cremeplay in Rust and Tauri v2.
RAM (Tray / Background) ~60 MB for Cremeplay vs ~400‑500 MB for Pear Desktop.
Direct Rust Innertube client: Instead of loading the bloated Google Polymer web app and all its tracking scripts, Cremeplay talks directly to YouTube Music's Innertube API from asynchronous Rust.
Recursive Working Set Trimming: Chromium-based webviews love holding onto inactive page caches forever. Cremeplay traverses its process tree and calls K32EmptyWorkingSet periodically to drop stale memory pages back to the OS.
Windows Job Object bundling: All child WebView2 processes are attached to a parent Windows Job Object (JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE), so they group cleanly under Cremeplay and never leave orphan processes behind when you quit.
- 记录日期: 2026-10-07T05:41:05.251Z