DEV Community

ashe
ashe

Posted on

I built Cremeplay, a YouTube Music desktop client in Rust and Tauri that uses ~60MB RAM

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. On top of that, Chromium spins up video decoders, keeps huge buffer caches in memory, and leaves loose background processes scattered in Task Manager.

I wanted a YouTube Music desktop client that felt native, stayed out of the way, and used as little memory as possible. So I built Cremeplay in Rust and Tauri v2.

Website: https://ashemarya.xyz/cremeplay
GitHub: https://github.com/asheohto/cremeplay

Cremeplay Screenshot

How low is the memory usage?

Here is how Cremeplay compares on my machine during normal playback:

Metric Pear Desktop (Electron) Webview Wrappers Cremeplay (Tauri v2 + Rust)
RAM (Tray / Background) ~400 MB - 500 MB ~180 MB - 250 MB ~60 MB
RAM (Open Window) ~600 MB - 850 MB+ ~250 MB - 400 MB ~150 MB
Process Hierarchy 6-10 loose Electron processes Loose Edge WebView processes Bundled in Windows Job Object
Audio Output (Volume Mixer) Scattered / Electron Unlabeled msedgewebview2.exe Labeled as Cremeplay with icon
Installer Size 150 MB+ Loose wrapper folder 4.6 MB setup / 20 MB portable

How I got the RAM footprint down

  1. 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.
  2. 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.
  3. 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.
  4. Native WASAPI audio session branding: If you use EarTrumpet or the Windows Volume Mixer, WebView apps usually show up as a generic "WebView Manager" process. Cremeplay hooks into IAudioSessionManager2 and IAudioSessionControl over COM to label the active audio stream as Cremeplay with the proper icon.

Cremeplay Library and Lyrics

What else is built in

  • Full YouTube Music discovery: Home feed, Listen Again, Daily Discover, personalized community playlists based on your listening history, and automatic radio queues.
  • SponsorBlock built in: Automatically skips non-music intros, skits, and outros on music videos.
  • Discord Rich Presence: Shows "Listening to [Song Title]" with the music icon, album cover, live progress bar, and direct links.
  • OBS Tuna local server: Broadcasts track metadata on http://127.0.0.1:1608/ for OBS overlays and my desktop lyric overlay, Lyricreme.

It is completely free and open source under the MIT license. You can grab the 4.6 MB installer or the standalone portable .exe from GitHub or the website:

Let me know what you think or if you run into any bugs.

Top comments (0)