{"id":25186,"date":"2025-07-27T04:36:11","date_gmt":"2025-07-27T04:36:11","guid":{"rendered":"https:\/\/www.newsbeep.com\/au\/25186\/"},"modified":"2025-07-27T04:36:11","modified_gmt":"2025-07-27T04:36:11","slug":"how-rust-based-zed-built-worlds-fastest-ai-code-editor","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/au\/25186\/","title":{"rendered":"How Rust-Based Zed Built World&#8217;s Fastest AI Code Editor"},"content":{"rendered":"<p>When <a href=\"https:\/\/www.linkedin.com\/in\/nathan-sobo-92b46720\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Nathan Sobo<\/a> set out to build the <a href=\"https:\/\/zed.dev\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Zed<\/a> code editor, he had a simple but ambitious goal: Make it fast and fun.<\/p>\n<p>Zed Industries (Zed, for short) is building what it expects to be the world\u2019s fastest <a href=\"https:\/\/thenewstack.io\/zed-ported-its-text-editor-to-linux-and-its-pretty-special\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">text editor<\/a> for hyper-responsive and collaborative coding experiences. It offers tools for native <a href=\"https:\/\/thenewstack.io\/the-evolutionary-tale-of-developers-and-debugging\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">debugging<\/a> support in multiple languages, agentic editing and edit prediction, with more features planned <a href=\"https:\/\/zed.dev\/roadmap\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">on the roadmap<\/a>.<\/p>\n<p>The <a href=\"https:\/\/github.com\/zed-industries\/zed\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Zed code editor<\/a> and its AI capabilities are all open source, including Zeta, the open large language model (LLM) that powers Zed\u2019s edit prediction.<\/p>\n<p>Performance Is Key<\/p>\n<p>\u201cYou hit a key or interact with the app in any way, and we have pixels available for you with zero perceptible lag,\u201d Sobo told The New Stack. \u201cZero perceptible lag means we need it on the next refresh of your monitor.\u201d<\/p>\n<p>That kind of performance seemed impossible in an era where most code editors are built on web technologies. But Sobo, who previously led <a href=\"https:\/\/thenewstack.io\/github-ceo-on-why-well-still-need-human-programmers\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">GitHub<\/a>\u2018s <a href=\"https:\/\/atom-editor.cc\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Atom<\/a> project, knew exactly why that approach would not work. \u201cYou\u2019re not going to do that with <a href=\"https:\/\/thenewstack.io\/30-years-of-javascript-10-milestones-that-changed-the-web\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">JavaScript<\/a> ever,\u201d he said bluntly.<\/p>\n<p>Yet, three years after founding Zed Industries in 2021, the company has built a <a href=\"https:\/\/thenewstack.io\/rust-programming-language-guide\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Rust<\/a>-powered <a href=\"https:\/\/thenewstack.io\/best-open-source-ides\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">IDE<\/a> that\u2019s attracting tens of thousands of developers with its combination of native performance and real-time collaboration features. But as AI capabilities became \u201ctable stakes\u201d for developer tools, Zed faced a new challenge in how to deliver AI-powered code completion that matched its zero-latency philosophy.<\/p>\n<p>The solution came through a partnership that transformed its inference infrastructure in just one week, Sobo said.<\/p>\n<p>The AI Integration Challenge<\/p>\n<p>By 2024, Zed had built a solid foundation for the company\u2019s performance-first editor, but it knew AI features were becoming essential. \u201cNew features coming from language models and the revolution in language models are becoming pretty much table stakes and expected as part of the experience of what it means to write software,\u201d Sobo told The New Stack in an insightful exchange.<\/p>\n<p>The company developed \u201cedit prediction\u201d \u2014 an AI feature powered by its Zeta model that anticipates what developers want to do next and suggests changes in real time. Built on the <a href=\"https:\/\/huggingface.co\/Qwen\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Qwen<\/a> series of open source models, the system uses a technique called <a href=\"https:\/\/research.google\/blog\/looking-back-at-speculative-decoding\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">speculative decoding<\/a> to optimize for the specific case of code editing.<\/p>\n<p>\u201cThe idea of an edit implies most of the text is unchanged, but a few parts might be changed,\u201d Sobo explained. \u201cWhat speculative decoding does is it says every time we get a run of tokens out of the model that matches something that\u2019s in the input, why don\u2019t we just assume that we\u2019re going to keep matching it a little bit longer, and run ahead.\u201d<\/p>\n<p>However, with its launch set for just a week away, Zed\u2019s existing inference provider was not delivering the performance the company needed, Sobo said.<\/p>\n<p>They were missing critical targets: P90 latency under 500ms and P50 under 200ms. Even worse, the provider offered limited compute capacity, no multiregion support, and what Sobo calls a \u201cblack box\u201d approach that conflicted with Zed\u2019s open source values.<\/p>\n<p>\u201cThey were very kind of turnkey in nature,\u201d Sobo said.<\/p>\n<p>With open source as one of its core values, Zed wanted more visibility into what was driving its model performance so the team could grow its own expertise and find iterative improvements, he noted.<\/p>\n<p>Engineering-First Partnership<\/p>\n<p>Enter <a href=\"https:\/\/www.baseten.co\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Baseten<\/a>, an inference platform provider that took a different approach. Instead of a hands-off service, it deployed forward engineers directly to Zed\u2019s problem. Within days, the team had tested over 75 different performance optimizations.<\/p>\n<p>\u201cBaseten showed up with an outstanding level of engagement,\u201d Sobo said. \u201cThey led with engineering and led with competence. \u2026 Watching them traverse the curve from where they were, which is like, \u2018Hey, I love you guys as people, I love how you\u2019re showing up, but the number isn\u2019t good,\u2019 to \u2018trust us, we will make this number, we\u2019ll move it where it needs to be in time for your deadline.\u2019 And then seeing them do that, that\u2019s pretty dope.\u201d<\/p>\n<p>The technical solution included the <a href=\"https:\/\/github.com\/NVIDIA\/TensorRT-LLM\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">TensorRT-LLM<\/a> framework instead of <a href=\"https:\/\/thenewstack.io\/introduction-to-vllm-a-high-performance-llm-serving-engine\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">vLLM<\/a> as the inference framework; <a href=\"https:\/\/huggingface.co\/blog\/not-lain\/kv-caching\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">KV caching<\/a> and custom-tuned speculative decoding to massively reduce latency; <a href=\"https:\/\/developer.nvidia.com\/blog\/optimizing-qwen2-5-coder-throughput-with-nvidia-tensorrt-llm-lookahead-decoding\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">lookahead decoding<\/a> for higher throughput; and <a href=\"https:\/\/www.baseten.co\/blog\/how-we-built-multi-cloud-capacity-management\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">multicloud capacity management<\/a> with geo-aware routing. The team also custom-tuned autoscaling settings to ensure optimal resource utilization while maintaining low latency.<\/p>\n<p>\u201cGetting their direct, hands-on help actually getting this model that we developed deployed doing speculative decoding was super key,\u201d Sobo noted. \u201cWe\u2019re very CPU people. When we touch GPU, it\u2019s to run graphics shaders, right? Getting this model running on hardware \u2014 that was not our core competency at all.\u201d<\/p>\n<p>The Results: 2x Performance Improvement<\/p>\n<p>The partnership delivered results that exceeded Zed\u2019s initial goals:<\/p>\n<p>45% lower P90 latency<br \/>\n3.6x higher throughput<br \/>\n100% uptime<br \/>\nOver 2x faster edit prediction compared to its previous provider<\/p>\n<p>In addition, the migration was seamless, Sobo said. Because Baseten maintained <a href=\"https:\/\/thenewstack.io\/openai-releases-new-models-trained-for-developers\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">OpenAI<\/a> compatibility, Zed moved all its traffic over within a single day with no code changes required.<\/p>\n<p>Moreover, the performance improvements did not stop at launch. Baseten\u2019s team continued iterating, eventually shipping a custom \u201cBaseten Lookahead\u201d decoding method that shaved hundreds of additional milliseconds off prediction times.<\/p>\n<p>Beyond Performance: A Philosophy Match<\/p>\n<p>For Sobo, the technical achievements were only part of the story. The partnership was also a lesson in how companies should work together.<\/p>\n<p>\u201cYou have this finite amount of time on this planet. And who do I want to actually spend that time interacting with?\u201d he said. \u201cThese guys just showed up in a way that made me feel like I like these guys, like I actually want to do business with them. And that was the overriding concern.\u201d<\/p>\n<p>This philosophy extends to how Sobo thinks about the entire developer tools landscape. While <a href=\"https:\/\/thenewstack.io\/zed-a-new-multiplayer-code-editor-from-the-creators-of-atom\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Zed competes<\/a> directly with <a href=\"https:\/\/thenewstack.io\/microsoft-makes-github-copilot-free-in-vs-code\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">VS Code<\/a> for individual developers, Sobo has even bigger ambitions: transforming how software teams collaborate.<\/p>\n<p>\u201c<a href=\"https:\/\/thenewstack.io\/linus-torvalds-reflects-on-20-years-of-git\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Git<\/a> is literally a tool that <a href=\"https:\/\/www.linkedin.com\/in\/linustorvalds\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Linus Torvalds<\/a> designed to manage patches that were being mailed to the <a href=\"https:\/\/thenewstack.io\/how-ai-helps-maintain-the-linux-kernel\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Linux kernel<\/a> mailing list,\u201d he pointed out. \u201cIt\u2019s literally a tool designed around email.\u201d<\/p>\n<p>Zed\u2019s vision involves real-time, fine-grained collaboration that goes far beyond traditional commit-based workflow, Sobo said. For instance, imagine highlighting code and instantly connecting with whoever wrote it or having persistent conversations that survive code changes and refactoring, he added.<\/p>\n<p>\u201cSo, the vision is long-term to eat into the software collaboration market, but the beachhead we\u2019re trying to get is just making developers love using our tool once we\u2019ve claimed that real estate,\u201d he added.<\/p>\n<p>The Rust Foundation<\/p>\n<p>None of this would be possible without Zed\u2019s foundational choice to build in Rust. When Sobo started the project in 2018-2019, he saw no alternative for the kind of system-level performance he demanded.<\/p>\n<p>\u201cYou need a systems programming language to implement something of the complexity of an editor if you want it to actually be responsive,\u201d he explained.<\/p>\n<p>\u201cSo, with Zed, after the experience with Atom and building on web technology, building a web page masquerading as a desktop app \u2014 which is what all these Electron apps are \u2014 I knew that web tech was never going to get me to the level of responsiveness that I really wanted.<\/p>\n<p>\u201cYou\u2019re not going to do that with JavaScript, ever. Like, you need the control over the memory, multithreading, shared memory across multiple threads, and what Rust offers is the ability to do all of that while maintaining a lot of the productivity advantages of some of these more managed languages, like JavaScript \u2014 slower to develop than <a href=\"https:\/\/thenewstack.io\/what-is-typescript\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">TypeScript<\/a>, I\u2019m not going to lie, but the result runs at a speed that would not be obtainable. And it\u2019s definitely faster to develop Rust than C++ or C for us, it rules out large categories of things that could go wrong statically.\u201d<\/p>\n<p>Zed has an open source code base with lots of people contributing \u201call over the place,\u201d Sobo said.<\/p>\n<p>And \u201cDoing that in a world where you can implement a use-after-free or there\u2019s no compiler support for avoiding some of these very difficult-to-debug, potentially very dangerous [bugs] \u2026 would have rendered Zed, with a small team, impossible to build, whereas Rust made it possible.\u201d<\/p>\n<p>AI Without Intellectual Laziness<\/p>\n<p>As AI tools become more powerful, Sobo has developed views on how to use them effectively. He said he is a heavy user of AI for coding, often switching between models for different tasks \u2014 using lighter models for codebase exploration, then switching to more powerful models for complex implementation work.<\/p>\n<p>But he\u2019s wary of what he calls \u201cintellectual laziness.\u201d<\/p>\n<p>Said Sobo: \u201cIf you could literally enter three prompts and do the dishes while this thing\u2019s vomiting this thing out, is it that valuable? Like, do you even want this? Or what can you learn from this and then literally throw it in the trash and start again.\u201d<\/p>\n<p>This philosophy reflects his approach to building Zed itself \u2014 use every tool available but never lose sight of the goal of building better systems.<\/p>\n<p>What\u2019s Next?<\/p>\n<p>Meanwhile, with its AI infrastructure optimized and a growing user base, Zed faces the challenge of any developer tool: feature completeness. The editor still lacks Windows support, which has generated constant requests from users. And the company is working to expand the tool\u2019s debugging capabilities and other IDE essentials, he said.<\/p>\n<p>Still, Sobo said he remains focused on the longer-term vision of transforming developer collaboration. The company\u2019s recent work has revived early collaboration features, with plans for persistent code permalinks, real-time shared editing and what Sobo calls \u201cmetadata layers\u201d on top of code that can capture human and AI conversations.<\/p>\n<p>\u201cThere\u2019s this sense of, like, the code is where we hang out together, kind of like people that are friends on \u2018<a href=\"https:\/\/thenewstack.io\/how-kubernetes-accelerates-multiplayer-game-development\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">World of Warcraft<\/a>,\u2019 like they hang out together in their whatever \u2018World of Warcraft\u2019 universe,\u201d Sobo said. \u201cI\u2019ve never played it. For me, my \u2018World of Warcraft\u2019 universe is the Zed code base, where I hang out with my friends and talk about the code, talk about the changes,\u201d he said, describing how Zed\u2019s distributed team already works. The goal is to scale that experience to the broader developer community.<\/p>\n<p>The Baseten partnership proved that when it comes to performance-critical infrastructure, engineering-first relationships can deliver transformative results.<\/p>\n<p>\t<a class=\"row youtube-subscribe-block\" href=\"https:\/\/youtube.com\/thenewstack?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\"><\/p>\n<p>\n\t\t\t\tYOUTUBE.COM\/THENEWSTACK\n\t\t\t<\/p>\n<p>\n\t\t\t\tTech moves fast, don&#8217;t miss an episode. Subscribe to our YouTube<br \/>\n\t\t\t\tchannel to stream all our podcasts, interviews, demos, and more.\n\t\t\t<\/p>\n<p>\t\t\t\tSUBSCRIBE<\/p>\n<p>\t<\/a><\/p>\n<p>    Group<br \/>\n    Created with Sketch.<\/p>\n<p>\t\t<a href=\"https:\/\/thenewstack.io\/author\/darryl-taft\/\" class=\"author-more-link\" rel=\"nofollow noopener\" target=\"_blank\"><\/p>\n<p>\t\t\t\t\t<img decoding=\"async\" class=\"post-author-avatar\" src=\"https:\/\/www.newsbeep.com\/au\/wp-content\/uploads\/2025\/07\/a95bb5bc-image-576x600.png\"\/><\/p>\n<p>\n\t\t\t\t\t\t\tDarryl K. Taft covers DevOps, software development tools and developer-related issues from his office in the Baltimore area. He has more than 25 years of experience in the business and is always looking for the next scoop. He has worked&#8230;\t\t\t\t\t\t<\/p>\n<p>\t\t\t\t\t\tRead more from Darryl K. Taft\t\t\t\t\t\t<\/p>\n<p>\t\t<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"When Nathan Sobo set out to build the Zed code editor, he had a simple but ambitious goal:&hellip;\n","protected":false},"author":2,"featured_media":25187,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[256,254,255,64,63,24711,105,24712],"class_list":{"0":"post-25186","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-artificial-intelligence","8":"tag-ai","9":"tag-artificial-intelligence","10":"tag-artificialintelligence","11":"tag-au","12":"tag-australia","13":"tag-red-hat","14":"tag-technology","15":"tag-topic"},"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/posts\/25186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/comments?post=25186"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/posts\/25186\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/media\/25187"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/media?parent=25186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/categories?post=25186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/au\/wp-json\/wp\/v2\/tags?post=25186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}