The cargo new Graveyard
A few months ago, I started grinding LeetCode in Rust. Coming from TypeScript & Go, my muscle memory kept hunting for a scratchpad, something like RunJS or a terminal REPL where you test a 15-line slice manipulation and immediately see what happens.
In Rust, I kept hitting the same friction loop:
cargo new leetcode_xyz -> paste into src/main.rs -> cargo run.
In less than weeks’ time, my drive had filled with folders for temporary use and huge folders of target/. It seemed insane having to scaffold a whole project to check small syntax.
Resisting the Desktop App
At first, I was planning on creating a GUI application for my desktop using Tauri or Electron. However, when halfway into deciding things such as windowing and bundling, not to mention platform signing, it suddenly dawned on me that adding layers of bulky UI abstractions while learning a minimalist language was just wrong.
I was not looking for a native offline app, I was just looking for a simple scratchpad just like runjs and instant output.
A Silent Daemon: Introducing rspad
So I pivoted to something simpler: a silent local daemon. That became rspad.
It’s a single binary written in Rust using Axum. The frontend is a Monaco editor with Dracula styling and Rust completions, it is embedded directly into the binary via rust-embed.
When you type rspad in your terminal, it spins up a local Axum server on port 7878 and opens your browser. When you run the snippet, it writes your snippet to an ephemeral temporary directory, compiles it via your machine’s native rustc, streams back the output or compiler diagnostics, and immediately purges the binary. There is no leftover junk on disk and also you get true offline speed.
Building a tool in Rust to fix my own Rust learning curve closed the loop for me. It eliminated the setup cost for me and helped restore the joy of iterative development.
Getting Started
Ensure Rust & Cargo are installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install rspad via Cargo:
cargo install rspad
Launch the scratchpad:
rspad
The code is open source on GitHub and published on crates.io. Feel free to check it out or drop feedback at pratik.dev!