Hello there, fellow tech enthusiast! Today, we’re going to compile Zed on Ubuntu. Don’t worry if you’re new to this; I’ll guide you through each step.
Step 1: Setup your environmentπ οΈ
Before we start, make sure you have the following:
- An Ubuntu system (obviously!)
- A stable internet connection β‘
- A cup of your favorite beverage β (optional, but highly recommended!)
Step 2: Install the Necessary Packages π¦
First things first, we need to install some packages that Zed requires. Open up your terminal (you can do this by pressing Ctrl + Alt + T
) and type in the following command:
sudo apt-get update && sudo apt-get install -y build-essential libncurses5-dev git
This command does two things: it updates your package list and installs the necessary packages for compiling Zed.
Then, you have to install Rust. If it’s already installed, make sure it’s up-to-date by hitting rustup update
Step 3: Clone the Zed Repository π
Next, we need to get the Zed source code. We can do this by cloning the Zed repository from GitHub. In your terminal, type:
git clone git@github.com:zed-industries/zed.git
Step 4: Time to Compile! βοΈ
Now that we have everything we need, it’s time to compile Zed. Navigate to the Zed directory and run the linux script by typing:
cd zed & ./script/linux
This command will install necessary system libraries. Now, you can compile Zed using the cargo
command:
cargo run --release
Step 5: Celebrate! π
Congratulations! You’ve just compiled Zed on Ubuntu. The binary can be found in target/release
folder. So, you can added to your $PATH
.
Zed is very fast on my machine π₯³ @zeddotdev #Zed #Rust #Ubuntu pic.twitter.com/eG024ESDT7
— K' (@shuck_) April 26, 2024
That’s it for today’s blog post. I hope you found it helpful and fun. If you have any questions or run into any issues, feel free to leave a comment below. Until next time, happy coding! π