Ray is getting rusty!
Today we're introducing Ray 4, a complete rewrite of Ray in Rust. It's the same Ray you know, with the same windows, logs, themes and shortcuts. Under the hood, everything is new.
- Faster: Ray 4 is ready to receive logs in 41 ms and handles 10,000 logs about 194× faster than Ray 3.
- Lighter: it uses about 4× less memory at idle, and the download is about 5× smaller.
- Native everywhere: Ray 4 runs natively on macOS, Windows and Linux.
And the best part? It's a free upgrade for everyone already using Ray! You can grab it here.
Why Rust?
Ray 3 was already a complete rewrite. It made Ray more responsive, but it still used Electron and React, just like Ray 2. In the end, it was a Chromium instance wrapping a single-page app. Chromium needs a lot of memory before it does anything, and that limited how much faster and lighter we could make Ray.
Some of us are big fans of Zed. Zed is a code editor written fully in Rust, with its own open source UI engine called GPUI. It draws the interface directly on the GPU, without a browser in between. Inspired by Taylor Otwell's tweets teasing a Laravel rewrite in Rust, we asked ourselves: could we rewrite Ray in Rust with GPUI? With the help of AI, it turned out we could.
What's new in Ray 4
- It stays fast with heavy logs. If a bug in your app sends thousands of logs at once, Ray no longer slows down your computer. Even after 10,000 logs in one session, Ray 4 uses about the same memory as Ray 3 does at idle (around 350 MB).
- Big dumps stay smooth. Ray 4 parses large logs on a background thread, so the window never freezes. Smart caching of logs keep recalculating while scrolling to a minimum.
- Safer SSH. Ray asks before it trusts a new server, and shows the old and new key when a server's key changes.
- Crash recovery. After a crash, Ray opens again and shows what went wrong.
- An easter egg. Find out yourself!

The numbers
We benchmarked Ray 3 against a release build of Ray 4 on macOS (Apple Silicon). Every number is the median of 5 runs.

Not many people send 10,000 logs to Ray at once. But when a bug in your app does, Ray 4 handles it with ease.
How we built it
We used the existing codebase of Ray 3 as our blueprint for Claude. We approached the rewrite as follows:
- Claude went through the full Ray 3 code base to map out all features and their behaviour, which we then manually validated to be 100% sure.
- Claude studied the Zed codebase for its patterns and architecture to get an idea on how to use GPUI correctly, then wrote an implementation plan.
- Claude built a UI kit of GPUI components, and we tested and adjusted every component in a playground app.
- Finally Claude built a first version. But it looked very rough, like a cheap knockoff, and many features didn't work correctly.

To close the gap, we built a parity harness. It drives Ray 3 with Playwright and Ray 4 through a driver built into the app. It runs the same scenarios in both apps, such as clicking a button, opening a window or connecting to a server. Then it compares the screenshots, the logs, the files on disk and the text on screen (with OCR from Apple's Vision framework). We then added thresholds to each scenario: how many percent of pixels may be different before a scenario is passing.

On top of the harness, Claude wrote a parity-fix skill that we ran with /loop. Each round:
- picks the first failing check
- reads the Ray 3 code to understand the expected behaviour
- writes a scenario that shows the gap
- makes the smallest fix
- runs every check and test
- commits
At the end of each work day we started a loop and let it run for the whole night. At the end of the week, we had something that looked like this. Still pretty rough, but a good base to start polishing.

Left is Ray 4, right is Ray 3. It's crazy how far we got by just five 7-8 hour loops in one week.
Since then, we've polished the UI by hand and fixed the slow parts. We've also done a lot of manual code review in parallel with review agents to make the code more idiomatic, more secure and as bug free as possible. Along the way, Claude also found a few very small and hard to trigger bugs that exist in Ray 3, and fixed those in Ray 4.
We have to admit, there will be a few smaller bugs remaining, that's inevitable. If you find any, please open a support ticket by mailing us at support@spatie.be or opening a github issue.
In closing
What started as an experiment soon turned into a real opportunity. A year ago, if you had told us we could rebuild Ray in Rust, we would have called you mad. Now Ray 4 is here.
The biggest lesson: with enough research and planning up front, and the right tools to check their work (the harness, the planning documents, ...), agents can get very far. In one week, they built something rough. But it was still a solid base to build on. We estimate that base would have taken us six months by hand. The polish took three more weeks, which would have been another four months by hand. That's ten months of work in four weeks: about 10× faster. What a time to be alive!
You can download the free Ray 4 upgrade here.