close icon
daily.dev platform

Discover more from daily.dev

Personalized news feed, dev communities and search, much better than whatโ€™s out there. Maybe ;)

Start reading - Free forever
Start reading - Free forever
Continue reading >

Zed: Learn Everything About the Open-Source Code Editor Built in Rust

Zed: Learn Everything About the Open-Source Code Editor Built in Rust
Author
Nimrod Kramer
Related tags on daily.dev
toc
Table of contents
arrow-down

๐ŸŽฏ

Learn about Zed, the fast and customizable open-source code editor built in Rust. Discover its features, history, performance, customization, and how to install it on Windows, Mac, and Linux.

Zed is a new, open-source code editor that's designed to be fast, customizable, and collaborative. It's built in Rust, offering superior speed and performance compared to many other editors. Here's what you need to know about Zed:

  • Fast and Efficient: Thanks to Rust, Zed offers a smooth coding experience, even with large files.
  • Real-time Collaboration: Work on code with your team in real time, no matter where you are.
  • Extensively Customizable: With themes, plugins, and adjustable settings, Zed can be tailored to fit your workflow.
  • Open Source: Launched in 2023 and open-sourced in 2024, Zed invites contributions from developers around the world.
  • Cross-Platform: Currently available for Mac, with plans for Linux support on the horizon.

Quick Comparison

Area Zed VS Code Atom Sublime
Performance Super fast with Rust Sometimes slow Often slow Pretty fast
Features Just what you need Lots of features Plenty, but fewer than VS Code Lots, but you need plugins
Customization Really flexible with plugins and looks You can change a lot Changeable with extras and looks Very flexible
Community New but growing Big and active Pretty good Very supportive
License MIT License (open to change and share) MIT License (open to change and share) MIT License (open to change and share) You can't change or share it

Zed stands out for its speed, simplicity, and community-driven development. It's an exciting option for developers looking for a modern, efficient code editor.

Background and History

Zed was made by Nathan Sobo and a team who worked on Atom and Tree-sitter at GitHub before. They wanted to make a code editor that was fast, simple, and fun to use, focusing on making coding a better experience for developers.

Here are some key points about Zed's history:

  • It started from the team's experience with Atom and Tree-sitter at GitHub, where they learned a lot about creating tools for developers.
  • The main goal was to build the perfect code editor by making it fast with Rust, keeping it easy to use, adding smart tools for coding, and making sure coders could enjoy their work.
  • The team thought other popular options like VS Code were too slow and complicated. They wanted to try something different.
  • Zed was first launched in 2023 as a product you couldn't change. But in 2024, they decided to make it open-source, meaning anyone can help improve it, based on feedback from users.
  • Right now, Zed only works on Mac computers, but they're planning to make it work on Linux soon because a lot of people have asked for it and Rust works well on Linux.
  • Making Zed open-source was a big decision. The team believes that working with the community will make Zed even better.

Overall, Zed is a fresh approach to code editing, focusing on what developers need: speed, ease of use, and a good experience. With Rust as its foundation, and a real love for coding, the Zed team hopes to set a new standard. Opening it up to the community means more people can help make Zed even better.

Installation

Getting Zed onto your computer is pretty easy, no matter what type of computer you have. Here's a simple guide to help you get started:

Windows

  • Go to the official website and download the Zed installer for Windows. Look for the .msi file.
  • Click on the .msi file you downloaded and follow the steps it shows you to set up Zed.
  • Once it's installed, you can start Zed from the Start menu or from a shortcut on your desktop.

Mac

  • Head over to the official website and grab the Zed file for macOS, which is a .dmg file.
  • Open the .dmg file. You'll see the Zed icon โ€“ drag it to your Applications folder to install it.
  • To start using Zed, find it in your Applications folder or use Launchpad.

Linux

Right now, Zed isn't ready for Linux in a one-click install way, but it's in the works. If you're keen to try it out, you can set it up from the source code like this:

  • First, you need Rust on your computer. If you don't have it, you can get it by running this line in your terminal:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Next, grab the Zed code by cloning its repository:
git clone https://github.com/zedapp/zed
  • Then, go into the Zed folder and build it using Cargo, Rust's package manager:
cd zed
cargo build --release
  • After it's built, you can run Zed from the ./target/release/ directory.

Zed is working on making the installation process the same for all types of computers. While Linux users have to wait a bit longer for a one-click install, building Zed from the source lets you try it out and even tweak it.

Interface and Usage

Zed has a straightforward and user-friendly interface. It's made to be less complicated than other code editors like VS Code, focusing on the tools you really need for coding.

Overview of the UI

When you open Zed, you'll notice a simple layout:

  • On the left, the file explorer lets you see and switch between your files and folders easily.
  • The big editor pane in the middle is where you do your coding. It shows line numbers and highlights your code to make it easier to read.
  • A minimap on the right gives you a quick overview of your code, so you can move through it fast.
  • The status bar at the bottom shows useful info like the theme you're using, the type of file you're working on, and more.

The design is all about simplicity, putting what you need right in front of you and keeping extra stuff out of the way.

Ease of Use

Zed makes common tasks straightforward:

  • Opening files is just a click away in the file explorer.
  • Basic editing uses the keyboard shortcuts you're already familiar with.
  • Saving happens on its own, so you don't have to worry about it.
  • Searching/replacing text is quick with a simple command. More complex options are there if you need them, but they don't clutter your space.

Zed is all about letting you focus on your code without distractions. It has more advanced features if you need them, but they don't get in the way.

Customization and Preferences

Zed keeps it simple at the start, but you can customize it a lot:

  • Themes - Pick from many colors and styles, or create your own.
  • Keybindings - Change shortcuts and set up your own for quicker coding.
  • Plugins - Add support for more programming languages, tools, and features. New ones are added regularly.
  • Preferences - Adjust settings like fonts, when to save files, and more in the Settings menu.

Zed lets you start with the basics and then adjust things as you like. Being open-source means you can even tweak its deeper workings. The aim is to keep coding smooth while letting you set things up your way.

In short, Zed is all about making coding fast and fun with its simple design and the power of Rust. It stays out of your way but is flexible enough for when you need more from it. As it grows, it could become a go-to editor for many developers.

Performance

Zed is super quick because it's built with Rust, a programming language that's known for speed. Let's dive into why Zed feels so fast and smooth.

Rust Language

Rust is the secret sauce behind Zed's speed. Unlike some other code editors that use Electron and can feel slow, Zed runs directly on your computer's hardware. This means common tasks like opening files or typing are almost instant.

Rust is also really good at managing memory, which helps Zed run smoothly even with a lot of files open or when working on big projects.

Multi-threading

Zed can do many things at the same time because it splits tasks across the different cores in your CPU. This way, features like code suggestions and auto-saving don't slow each other down.

This multitasking is especially noticeable when you're typing. Zed can offer hints and check your code without getting in your way.

GPU Acceleration

Zed also uses the GPU (the part of your computer that handles graphics) for displaying text and scrolling. This makes moving through your code super smooth, even if you're working with large files.

Design Trade-offs

The team behind Zed chose to keep things simple. They focused on what's most important for coding and left out anything that could make the editor slow. This means Zed is not just fast but also easy to use.

Looking ahead, the Zed team wants to use Rust and the power of modern computers even more. They aim to keep Zed fast, even as they add new features like working together on code in real-time.

For anyone who codes and cares about not wasting time, Zed's quickness and ability to handle lots of tasks at once make it a great choice. You'll really feel the difference when using it for your projects.

Key Features

Real-time Collaboration

Zed lets you work on code with your team at the same time. You can see what others are typing right away, and it's like you're all editing the same document together.

Here's what makes it cool for team projects:

  • It keeps everyone's changes in sync.
  • You can see different colored cursors to know who is typing where.
  • Changes are shared as they happen, so there's no mix-up.
  • You can chat with your team right in Zed to talk about the code.
  • Starting a group session is as simple as sharing a link.

This feature is great for:

  • Fixing code together without stepping on each other's toes.
  • Quickly talking through ideas and finding solutions.
  • Helping new team members get up to speed with pair programming.

Working together in Zed can make coding with others much smoother and more direct.

Programming Language Support

Zed is friendly to many programming languages, including:

  • JavaScript and TypeScript
  • Python
  • Java
  • C++

For these languages, Zed offers:

  • Highlighting code so it's easier to read
  • Suggestions on how to complete your code
  • Checking your code for mistakes
  • Formatting your code to look neat
  • Tools to help debug
  • Special shortcuts for coding faster

Zed uses something called Tree-sitter to understand your code better. This means it can do more cool stuff, like suggesting code.

Since Zed is open-source, anyone can add support for more languages. There's even help on how to do this if you're interested.

Zed aims to make coding in your favorite language a breeze, and it's always getting better thanks to people adding new features.

Customization

Zed is all about making your coding space yours. You can change a lot, like:

Themes

  • Comes with some cool looks already
  • You can use themes like Nord and Gruvbox
  • Make your own theme by changing colors and fonts

Keyboard Shortcuts

  • Change shortcuts to your liking
  • Make new shortcuts for things like compiling
  • There are cheat sheets to help you remember

Preferences

  • Adjust fonts, how often to save, and more
  • Pick how you want the editor to look
  • Turn features on or off as you like

Plugins

  • Find new tools to add
  • Share your own tools with everyone
  • Keep some tools just for your team

Contributing

  • Being open-source, you can help make Zed even better by adding to its code

Zed lets you set up your coding environment just how you like it. Whether you're just starting or you've been coding for years, you can make Zed work perfectly for you.

sbb-itb-bfaad5b

Extensibility and Plugins

Zed lets you add new features or change how things work with its plugin system. This is really important because it means anyone can make Zed do more cool stuff.

Plugin Architecture

Here's how making a plugin for Zed works:

  • You use Rust and a special toolkit (zed_plugin) to create plugins.
  • Plugins can change how Zed works, like adding new tools or changing the editor.
  • Zed makes sure plugins play nice with each other.
  • You use Rust's tools to share your plugin.

This setup lets you create a lot of different things, like support for more programming languages, tools to check your code, and even new themes.

Discovery and Installation

Finding and adding plugins is super easy:

  • Zed has a place where you can look at all the plugins people have made.
  • You can read about what each plugin does and add it to Zed with just a click.
  • Your plugins stay up to date automatically.

If you make your own plugin, sharing it is straightforward with Rust's package system.

Here are some cool plugins people have made:

  • Python LSP - Makes working with Python better.
  • Code Minimap - Shows you a small map of your code.
  • Vim Mode - Lets you use Vim's shortcuts in Zed.
  • Output Panel - Lets you see the results of your code builds in Zed.

Thanks to being open-source, there are always new plugins being made for Zed. And if you need help, there's a community forum where you can ask questions.

Security

Zed makes sure it's safe to use by using Rust's built-in safety features and encrypting messages when you're working with others.

Rust Language Security

Because Zed is made with Rust, it's protected against some common security problems:

  • Memory bugs - Rust stops these from happening. This means fewer crashes and less chance for hackers.
  • Race conditions - Rust's smart checks prevent these errors that happen when many things try to run at the same time.
  • Undefined behavior - The Rust compiler helps avoid unpredictable code behavior, making Zed more reliable.

Rust deals with these issues from the start, so Zed is safer without needing extra steps.

Encryption

When you're coding together in Zed, it keeps your work private by using strong encryption:

  • It sends messages securely using WebRTC, which is like a safe way to talk over the internet.
  • It makes sure keys (a kind of digital lock and key) are shared safely.
  • Zed's servers only pass along encrypted data, meaning they can't see what you're working on.

This keeps your coding sessions private and safe from eavesdroppers.

Sandboxing and Permissions

Zed limits what its plugins can do by running them in a safe area, or sandbox:

  • Plugins can only make changes in Zed and can't mess with other apps or your computer.
  • It restricts access to sensitive features, like copying and pasting or talking to the operating system.
  • You get to say yes or no to what plugins can do, giving you control.

Sandboxing makes Zed safer by limiting risks and letting you choose what's allowed.

Ongoing Improvements

Being open-source means Zed's safety keeps getting better:

  • Rust keeps adding new safety features, making Zed even stronger.
  • Encryption methods are updated to keep up with new tech.
  • Feedback from users like you helps make sandboxing and permissions even better.

Zed aims to stay safe now and in the future, thanks to Rust and a community that cares about security.

Contributing to Zed

Zed is an open-source project, which means anyone can help improve it. Here are some ways you can contribute:

Report Bugs and Suggest Features

If you run into problems with Zed or have ideas for making it better, you can:

Make sure to describe the issue or idea clearly so it can be addressed properly.

Write Code

You can also help by writing code. Here's how:

  • Pick an issue you want to work on from the GitHub page and say you'll handle it
  • Make a copy of Zed's code (this is called 'forking'), and make your changes there
  • Once you're done, ask the Zed team to add your changes by making a 'pull request'

Remember to check the guidelines for contributing.

Support Zed by:

Donations help cover costs like keeping the website running, events, and more.

Spread the Word

Let more people know about Zed by:

  • Writing about your experience on blogs, Twitter, or YouTube
  • Adding your project to the Built with Zed page
  • Liking the GitHub page and sharing it with others

The more people know about Zed, the better it becomes for everyone.

Since Zed is new and built by the community, every bit of help counts. Working together, we can make Zed the best code editor out there!

Comparison to Other Editors

Let's see how Zed is different from other well-known code editors like VS Code, Atom, and Sublime. We'll look at things like speed, what you can do with each editor, how you can make them your own, and the community around them.

Area Zed VS Code Atom Sublime
Performance Super fast with Rust Sometimes slow Often slow Pretty fast
Features Just what you need Lots of features Plenty, but fewer than VS Code Lots, but you need plugins
Customization Really flexible with plugins and looks You can change a lot Changeable with extras and looks Very flexible
Community New but growing Big and active Pretty good Very supportive
License MIT License (open to change and share) MIT License (open to change and share) MIT License (open to change and share) You can't change or share it

Performance

Zed is the fastest because it uses Rust and makes your computer's graphics card help out. VS Code might slow down sometimes, and Atom is known for being slow. Sublime is usually quick.

Features

VS Code comes with a lot of tools right from the start, while Zed keeps things simple but lets you add more with plugins. Atom and Sublime also depend on plugins for extra tools.

Customization

All these editors let you make them fit your style, but Zed's open-source nature means you can really dive deep into changing things.

Community

VS Code has a huge number of people making things for it and helping out. Zed's group of users is smaller but it's getting bigger because anyone can help improve it. Atom and Sublime have lots of supporters too.

Licensing

Zed, VS Code, and Atom let anyone use and change them because they're open source. Sublime is different because it doesn't let you change or share it as freely.

In summary, Zed stands out with its speed thanks to Rust, and it's really open for changes. VS Code is great in some ways but can be slow. Atom, Sublime, and Zed all benefit from their communities and the ability to add new features through plugins.

Conclusion

Zed is a new way to write code that focuses on being fast, simple, and open for everyone to help improve. It's built with Rust, a programming language known for speed, and anyone can use and change it because it's open-source.

Key Advantages

  • Really fast because of Rust and using your computer's graphics to help, making it smooth to work on big projects
  • Easy to use with a design that doesn't get in your way, so you can just focus on writing code
  • Work together in real time which makes working in a team easy
  • You can change a lot with themes and plugins, and you can even dig deep to change anything you want
  • Always getting better because anyone who uses it can also help make it better

Zed makes writing code quicker, easier, and more fun. It's really fast because of Rust and lets everyone help make it better.

Outlook

Zed is still new and open to changes. It's expected to get even better with more support for different computers, new plugins for more features, and more people helping to make it better.

If you're tired of slow or limiting tools, Zed might be a refreshing change. It's light and has a community of users making it better. Instead of dealing with slow software or rules that hold you back, you can just enjoy making things.

Try Zed for your next coding project and see how its speed, simplicity, and community might help you.

Is Zed written in Rust?

Yes, Zed is made using Rust. Rust is chosen because it's fast and keeps things running smoothly. It's good for making apps like Zed that need to respond quickly.

What code editor is built on Rust?

Besides Zed, there are a few other code editors made with Rust, such as:

  • Xi-Editor - A simple yet speedy editor.
  • Helix - Made to be easy to change with Rust.
  • Gauss - Fast and simple, focusing on the basics.

Rust is popular for making new tools for developers because it's fast and safe.

What is Zed code editor?

Zed is a tool for writing code that's made by the same people who worked on Atom. It's special because:

  • It's built with Rust, making it fast and reliable.
  • You can code with others in real time.
  • You can add new features with plugins.
  • You can change how it looks and works to suit you.

Zed aims to be easy to use while still having everything you need.

Will Zed be open source?

Yes, Zed has been open source since January 2023. This means anyone can help make it better by adding new features or fixing bugs.

Related posts

Why not level up your reading with

Stay up-to-date with the latest developer news every time you open a new tab.

Read more