Written in Rust, built with Electron

Xray: An experimental text editor for innovating Atom

Jane Elizabeth
© Shutterstock / current value

The Atom team wanted to develop radical new ideas without risking the core stability of Atom. Enter Xray. This Electron-based text editor is a testing playground for new approaches to high performance, collaboration, extensibility, and web compatibility.

What do you do when you want to experiment with the fundamental building blocks of your popular invention? Radical innovation is so rarely successful; you don’t want to kill the golden goose over a performance tweak that might not even work.

For the Atom team, this turned out to be a non-issue. Instead of worrying about fiddling with their main product, they just created a next-gen Electron-based text editor to serve as the workspace for their Atom experiments. With Xray, developers can experiment to their heart’s content without worrying about the fundamental stability of the core Atom system.


Right now, Xray mainly serves as a testing ground for radical new ideas. This is mainly a short-tem project aimed at iterating rapid change and learning as much as possible. Move fast and break things, in a secure environment that won’t endanger the core text editor.

This mad science does indeed have a goal. Xray intends to improve and create a cross-platform text editor with high performance, easy collaborating, convenient extensibility, and seamless compatibility. While all of these might be a reach for what is essentially a test dummy, the Atom team is setting expectations high for this experiment.

Xray is designed to be lightweight and responsive, with feedback well within the latency windows suggested by RAIL. Memory consumption is kept low, but Xray does trade memory for speed and extensibility as long as the requirements are reasonable.

Collaboration is an important part of development. Xray makes it easier for developers to code in teams, as editors and other UI elements have been explicitly designed to work under shared conditions. Additionally, the entire system has been abstracted in such a way that it works efficiently over network connections.

Developers are able to control their own tools with highly extensible and convenient APIs. These powerful tools enable developers to sustain rapid development without destabilizing the package ecosystem.

Xray also prioritizes web compatibility, so editing on GitHub is just like editing on Xray. Their feature-rich editor component can be used both on the web and within other Electron applications. This feature is intended to unify the experience between GitHub and Xray.

SEE MORE: Atom-IDE: Facebook and GitHub team up for improved language integration

Written in Rust, built with Electron

Why Rust? Well, the Atom team wanted to write in a language that is fast by default. It’s pretty hard to write slowly in Rust. By spending less time and resources on the platform itself, the team can devote more time to innovation and running package code.

All of the core application code should be written in Rust. (With one exception: view logic.) This ensures that Xray has a minimal footprint to load and execute. Using a robust type system designed for multi-threading makes it easier to exploit parallelism as needed.

As for why the Atom team chose Electron, this is due to its high performance as a cross-platform, extensible user interface. Yes, Electron does add a lot of overhead. But the benefits for extensibility and customizable UI elements should outweigh the drag on the performance goals.

Plus, Electron ships with a JavaScript VM that provides a very useful scripting API, which was on many developers’ wishlists.

SEE MORE: There’s a new addition to the family: Meet Eclipse Corrosion, the Eclipse IDE for Rust

Get Xray

More information about the architecture and future roadmap is available here. Want to try out Xray? This text editor is available via GitHub here. Quick caveat: this is very much an experiment, so be warned.  Contributors are highly welcomed here.

Jane Elizabeth
Jane Elizabeth is an editor for

Leave a Reply

Be the First to Comment!

Notify of