Menu
Sign In Pricing Add Podcast

Matthias Endler

Appearances

Rust in Production

Volvo with Julius Gustavsson

1249.816

It sounds like a good strategy for testing out new things in general and maybe specifically testing out Rust in embedded environments or maybe in larger organizations.

Rust in Production

Volvo with Julius Gustavsson

1336.834

Who made the decision to hire external? Was it you because you maybe wanted to get an extra pair of hands? Was it the management? Was it a requirement from Volvo itself?

Rust in Production

Volvo with Julius Gustavsson

1379.943

Did you have a deadline on, for example, you decided that you would be done by that time or you would have something to show by that time and if not, then the project would be canceled?

Rust in Production

Volvo with Julius Gustavsson

1545.595

But even then, going forward, did you compare your maybe output with the output of the C-based version in order to make sure that it was compatible? Or was it mostly, you know, it's up now, we can compare the gRPC outputs, essentially?

Rust in Production

Volvo with Julius Gustavsson

1586.335

Interesting. So you don't use gRPC anymore. What were some of the issues that you faced?

Rust in Production

Volvo with Julius Gustavsson

1687.569

Right, and my assumption would be that you had to build out a Rust library for reading and writing that format. Yes, yes. And was it hard for you? Did you use any existing libraries to build that parser or... to serialize the messages over the POS?

Rust in Production

Volvo with Julius Gustavsson

1768.598

And what about the automotive diagnostic standard, I guess you called it? What about that protocol? Was there an existing implementation or was it easy to write?

Rust in Production

Volvo with Julius Gustavsson

1830.168

That's super amazing because there are a couple other vendors that use Rust in production now. For example, Renault, which is also a prominent car manufacturer. I wonder if they use similar protocols or if they have a different setup. I do know that everyone sort of used or uses CAN bus, but then the wire protocols might be different, right? You have different requirements. Yeah.

Rust in Production

Volvo with Julius Gustavsson

1856.035

Is there any collaboration going on between those car vendors on a message bus level, on a protocol level?

Rust in Production

Volvo with Julius Gustavsson

1908.652

Are you planning to open source some of that work? Are people ever going to be able to take a look at this and maybe use it in some way?

Rust in Production

Volvo with Julius Gustavsson

2.088

It's Rostium Production, a podcast about companies who use Rost to shape the future of infrastructure. I'm your host, Matthias Endler from Corot, and today we talk to Julius Gustafsson from Volvo about putting the good kind of Rost into cars. Julius, thanks for being a guest. Thanks for taking the time. Can you introduce yourself and Volvo, the company you work for?

Rust in Production

Volvo with Julius Gustavsson

2070.327

It feels like to be able to pull this off, you first had to invent or create the universe because there were so many small little bits and pieces that someone would have to write and you needed to build this entire tool chain. So moving forward, probably... As a next project, this will be way easier because you built out a lot of the tooling. But I wondered if the Rust ecosystem also helped you.

Rust in Production

Volvo with Julius Gustavsson

2096.995

So what are some of the things that you used from day one or maybe you even use today? A couple of nice projects that you want to mention here. Yeah.

Rust in Production

Volvo with Julius Gustavsson

2115.969

Shout out to Noah, who is one of the maintainers of Probe.

Rust in Production

Volvo with Julius Gustavsson

2172.382

I do wonder, are there any things in Probe RS that are missing right now? And things in the embedded or automotive ecosystem that you would like to have reflected in Rust, in the Rust ecosystem?

Rust in Production

Volvo with Julius Gustavsson

2275.213

Do you have a requirement to create a software bill of materials?

Rust in Production

Volvo with Julius Gustavsson

2329.002

And where do these files end up? You certainly use it for internal documentation, but do you also have to hand them out to some other authority which approves certain software?

Rust in Production

Volvo with Julius Gustavsson

2392.9

I know from my car that there is a list of tools or a list of software that got used, especially I would say maybe larger applications or larger libraries. For example, curl is a very popular thing. And we had Daniel Sandberg in the podcast as well. But I wonder how far it goes down. Because you have dependencies and sub-dependencies and dependencies of these dependencies.

Rust in Production

Volvo with Julius Gustavsson

2422.685

Is that all listed somewhere? Can I access that as a user? Can I maybe get the entire cargo tomo of the project or would that be too much?

Rust in Production

Volvo with Julius Gustavsson

2450.009

For example, Sardi, would it show up somewhere? Yeah, it would show up, definitely. Okay.

Rust in Production

Volvo with Julius Gustavsson

2466.226

Let's say I started Volvo and I'm in your team and I want to start working on this project in Rust. What would my day-to-day look like? I plug myself into an embedded device? Certainly not. There's probably some other device somewhere I need authentication for. And then we have some CICD process. We have ProBias somewhere in the tool chain. We have an IDE.

Rust in Production

Volvo with Julius Gustavsson

2492.846

And then we have a build process in the end. And eventually... There will be a binary and a software bill of materials and probably some sort of integration of all the components later on. So walk us through all the steps.

Rust in Production

Volvo with Julius Gustavsson

2651.434

What's so special about Zool? Because not many people might know it.

Rust in Production

Volvo with Julius Gustavsson

270.134

How much of that was because of Rust and how much of it was because of your experience with embedded systems?

Rust in Production

Volvo with Julius Gustavsson

2720.166

Isn't it also true that we're dealing with embedded devices here? I know roughly how that would work for a backend service, say. But for embedded devices, I would be scared that the device would be in a weird limbo state or... wasn't completely flashed when the test ran. So how do you ensure that the tests are always correct and start from a deterministic position?

Rust in Production

Volvo with Julius Gustavsson

2817.549

How long does a typical build take?

Rust in Production

Volvo with Julius Gustavsson

2843.391

And that includes setting up all the devices and running the integration test?

Rust in Production

Volvo with Julius Gustavsson

2870.338

Does that include all of the components, or does it include just the Rust components?

Rust in Production

Volvo with Julius Gustavsson

2879.798

And how often is Rust the culprit of failing a build?

Rust in Production

Volvo with Julius Gustavsson

2900.933

Does it mean you don't even flash to the device that often because you have a very iterative way of building the software with your IDE and with the type system?

Rust in Production

Volvo with Julius Gustavsson

2933.1

How big is the codebase, the Rust codebase?

Rust in Production

Volvo with Julius Gustavsson

2953.095

And that was developed by how many people? What's the team size?

Rust in Production

Volvo with Julius Gustavsson

2968.12

Yeah, very nice. A very substantial code base, but also, I would say, still manageable. So I would assume a lot of work also went into speccing out things, creating architecture diagrams, making sure that everything is wired up correctly, communication and so on. There's a lot of complexity introducing a completely new toolchain, new language, everything.

Rust in Production

Volvo with Julius Gustavsson

3061.801

How long until they are fully ramped up?

Rust in Production

Volvo with Julius Gustavsson

3077.985

So it's a bit of a myth that the Rust learning curve is a huge problem for people that want to work with Rust professionally.

Rust in Production

Volvo with Julius Gustavsson

3135.379

And how did you learn how to write idiomatic Rust? Do you have any coding guidelines? Did you talk to the people from Grappit on how to write idiomatic Rust? Are there any resources that you maybe recommended to your team?

Rust in Production

Volvo with Julius Gustavsson

3201.336

And when I would be tasked with building code for cars, I would be extremely defensive because I know that I wouldn't be able to just connect to the car or maybe have a shell connection and just troubleshoot on the live machine. These cars, they run for years and sometimes they have to go without maintenance or people don't do those updates that regularly as they should.

Rust in Production

Volvo with Julius Gustavsson

3227.654

So how defensive is the code? How, let's say, painstaking is it to work with inputs and outputs? How does the error handling story look like? Is it... Would it be normal Rust code that people could understand or is it very specific Rust code?

Rust in Production

Volvo with Julius Gustavsson

3293.045

Do you have a custom panic handler? Sure.

Rust in Production

Volvo with Julius Gustavsson

3299.439

That means failing is not an option. You need to handle every condition. Because if you're the thing that boots things, then who boots you if you fail?

Rust in Production

Volvo with Julius Gustavsson

3331.731

Are there any rules around allocation?

Rust in Production

Volvo with Julius Gustavsson

3349.26

That means you disabled the allocator.

Rust in Production

Volvo with Julius Gustavsson

3377.031

Because you know the sizes of the payloads that you have to handle at compile time. Yeah, exactly. It's similar to how Oxide does it. They have this predictable...

Rust in Production

Volvo with Julius Gustavsson

3433.34

If someone wants to buy a car that has rust components now, which cars would they need to buy? You said there are production cars. There's probably one Volvo and one Polestar, as far as I'm aware.

Rust in Production

Volvo with Julius Gustavsson

3460.605

Did you have any issues in production? With the hardware or with... Well, let's say both. But I'm curious if you sold a car and then it came back because of a rust bug, because of an issue in the rust code.

Rust in Production

Volvo with Julius Gustavsson

3478.641

Is that a common thing when you ship certain components and they are C-based, for example, that usually you covered most of the edge cases when things hit production? Or are there any rollbacks or changes?

Rust in Production

Volvo with Julius Gustavsson

3541.304

Can you give us an outlook into the future, maybe one, two, three, four, five years down the road? What is Rust usage at Volvo going to look like?

Rust in Production

Volvo with Julius Gustavsson

3641.249

Now, I find it extremely surprising that a lot of the dependencies that I use for writing Rust and writing Rust in production is the same that you use for an embedded project at Volvo. And this is really cool because you can reuse the code You can share ideas, you can share different bits and pieces and the entire ecosystem becomes much better. So you kind of cross different boundaries with Rust.

Rust in Production

Volvo with Julius Gustavsson

367.753

Why did you decide to build that with AsyncRust, given that it was still in an alpha version? Couldn't you have done something with Syncrust?

Rust in Production

Volvo with Julius Gustavsson

3673.781

And how does it look like in comparison between Dev and Prod?

Rust in Production

Volvo with Julius Gustavsson

3843.917

That sounds really empowering and probably very encouraging for a lot of people who might listen. Would that be your message to the Rust community?

Rust in Production

Volvo with Julius Gustavsson

3932.311

And where can people learn more about this project, about Rust at Volvo?

Rust in Production

Volvo with Julius Gustavsson

396.758

A lot of backend developers hearing that might be a bit scared by the way AsyncRust worked back in the day where even back in the day, I think you needed to build your own futures. Was that still the case back then?

Rust in Production

Volvo with Julius Gustavsson

3974.318

Yeah, that was a really nice one. I read this one and also this prompted me to reach out. And where can people learn more about yourself?

Rust in Production

Volvo with Julius Gustavsson

4033.803

That means people will run into you at some point or another, and we hope to see you at a conference or at an event speaking about Rust and Volvo or safety-critical components. Yeah, let's hope so.

Rust in Production

Volvo with Julius Gustavsson

4069.209

Julius, thanks for taking the time and thanks for being an ambassador of Rust in the car manufacturing space.

Rust in Production

Volvo with Julius Gustavsson

4079.05

It was a great chat. Rustium Production is a podcast by Corot. It is hosted by me, Matthias Endler, and produced by Simon Brüggen. For show notes, transcripts, and to learn more about how we can help your company make the most of Rust, visit corot.dev. Thanks for listening to Rustium Production.

Rust in Production

Volvo with Julius Gustavsson

414.972

And you still saw the potential there, even though it was a bit, let's say, half-baked or it wasn't completely fleshed out yet?

Rust in Production

Volvo with Julius Gustavsson

479.674

Given your background as a C developer and probably also as someone who has a fair share of experience with embedded systems, how would you have done that with the technologies that you used before? C, how would that look like?

Rust in Production

Volvo with Julius Gustavsson

55.071

The first time I heard about this project was even a few years ago when we were at a conference. I can't even remember which one. But someone mentioned that Volvo was working with Rust. And by Rust, we mean Rust, the programming language, of course, not Rust, the oxidation process.

Rust in Production

Volvo with Julius Gustavsson

557.438

For instance, which assumptions?

Rust in Production

Volvo with Julius Gustavsson

573.604

Even for someone like you who has quite a ton of experience in that area?

Rust in Production

Volvo with Julius Gustavsson

591.471

So for some context, we are in 2018-ish and you built your first hardware abstraction layer for controlling the fans from Android. And you saw it working on first try. That must have made you pretty excited about Rust and its potential to go from idea to first prototype layer. in a reliable manner. Did you show that prototype to other colleagues?

Rust in Production

Volvo with Julius Gustavsson

617.247

Did you talk about Rust back in the day, or was it more of a hobby and side project?

Rust in Production

Volvo with Julius Gustavsson

76.638

But it was way back in the day, and I didn't even know what parts of it were public or if that was a separate vendor. Now, take us back to maybe 2018 or so when this project started. What was the situation with Rust back then? What was the situation, especially with embedded Rust? And how did you even think about using Rust at Volvo?

Rust in Production

Volvo with Julius Gustavsson

782.717

I'm trying to put myself into the position of a team member or a colleague of yours in 2018. So you're telling me about Rust. You're enthusiastic about it. I see the prototype. I see that it's working. But I don't really know. I don't really have any Rust experience. And I don't know how long it took to build that prototype.

Rust in Production

Volvo with Julius Gustavsson

804.13

So I look at all of the tooling that we built in C and C++ and the ecosystem that requires... And then I ask you about QNX support or tricore support for Infineon CPUs. And you say, well, it doesn't exist or it's a work in progress. Suffice to say, I'd be a little skeptical.

Rust in Production

Volvo with Julius Gustavsson

850.011

Thinking about the situation in 2018 and 2019 when things were not completely fleshed out, was everyone on board already or was there some political infighting as well about whether to go forward with Rust or maybe be a bit more conservative here? Because you also mentioned that the car industry is conservative.

Rust in Production

Volvo with Julius Gustavsson

912.116

Why are they necessary for a toolchain to fulfill?

Rust in Production

Volvo with Julius Gustavsson

950.031

Did you back in the day already know about the efforts of building a compiler, safety-critical Rust compiler that would be allowed to be used in such environments, like things that Ferris systems built, for example?

Rust in Production

Zed with Conrad Irwin

1043.672

When I looked through the code, I actually saw that you use both Tokyo and Small. I would assume that your own async runtime is based on top of Small, or is that even a separate runtime? You have three in total.

Rust in Production

Zed with Conrad Irwin

1077.594

Yeah, and I also would assume that if you took your async runtime and published it as a separate project, that would essentially mean that you would have to maintain it for external people. And it could also be a bit of an issue in regard to how you want to use that runtime inside Z. So I'm assuming that you don't want to do that.

Rust in Production

Zed with Conrad Irwin

1115.627

It's very nice to know that you have your own runtime, because I'm kind of a big proponent of diversity. And we have Tokyo, we had AsyncSTD, we have Small, and there's Glomio and a couple others. What's the state of the AsyncGross ecosystem in your mind? Yeah. I can already see that. I have some stuff to say.

Rust in Production

Zed with Conrad Irwin

1215.966

Is that, in your opinion, something that will just solve itself at some point once the ecosystem grows a bit? Or is it a systemic issue?

Rust in Production

Zed with Conrad Irwin

1273.221

where we had multiple iterations and we ended up with, anyhow, this error, snafu, and all of these other abstractions that we didn't really have. All of these dependencies are relatively new in comparison to how old Rust is. that took a different turn because it took some time to mature and we didn't really stabilize on one error handling library.

Rust in Production

Zed with Conrad Irwin

1297.987

Whereas in asyncrust, pretty much from the beginning, people kind of settled on Tokyo because as you said, it's a much more complicated piece of software and the ecosystem just wasn't as mature yet. But now we find ourselves in a situation where Tokyo is the dominant asyncrunt time. And is it just me or do you also see that problem there? And what would be the revelation here?

Rust in Production

Zed with Conrad Irwin

1388.754

At the same time, it gives me hope when you say that, because the jQuery example was a good outcome in my book, because we were able to experiment with these alternative JavaScript framework or so. And then browsers caught up and then they added some of the features into their own native implementation.

Rust in Production

Zed with Conrad Irwin

1408.963

I guess the same could happen in Rust where we take parts of Tokyo and stabilize that, put it into the standard library, but we have to be careful there. For example, there's...

Rust in Production

Zed with Conrad Irwin

1419.034

async read and async write trade and technically you could already stabilize that but it's a bit debated right now whether this is the right abstraction that we want to settle on going forward exactly and it it takes time to figure those out particularly for something like rust that's such a big complicated project like any extra complexity they bring into the standard library it like deserves a lot of scrutiny

Rust in Production

Zed with Conrad Irwin

1491.846

Is that rule somewhere codified? Is that part of your code style? For example, you separate sync and asynchrost, or is that something that evolved naturally?

Rust in Production

Zed with Conrad Irwin

1539.465

That's so funny when you say that because you almost take the function coloring problem and make it a feature where you take the slow parts and you mark them as async so that you know exactly that this is something that you should not run on the main thread.

Rust in Production

Zed with Conrad Irwin

155.921

If Z didn't exist, which editor would you use?

Rust in Production

Zed with Conrad Irwin

1562.16

We'll be back later. And you can see it in the type system too. Are there any other challenging aspects of building a text editor in Rust? Any unexpected hurdles?

Rust in Production

Zed with Conrad Irwin

1624.81

Yeah, because everyone wants a different set of features. That too. Vim Mode is the classic example of that.

Rust in Production

Zed with Conrad Irwin

1662.475

In preparation for this interview, I also checked out your new YouTube channel because you recently started a channel about talking about the internals and said, and I will link it in the show notes. It's pretty majestic. The one thing that I realized from these interviews was that you sometimes touched on a library called TreeSitter.

Rust in Production

Zed with Conrad Irwin

1683.34

You mentioned it before, but that seems to be a bit of the secret sauce in there because apparently, and correct me if I'm wrong here, Other editors are not built this way. They don't work on this level of abstraction, almost like an AST, an abstract syntax tree level of abstraction to modify text. Can you elaborate on this a bit? What is it? And also, do you agree?

Rust in Production

Zed with Conrad Irwin

1708.873

Is that really critical central part of that?

Rust in Production

Zed with Conrad Irwin

179.298

Yeah, and you did a great job there. I have to say there are very few gaps in the Vim support by now. It wasn't the case just half a year ago, but just seeing the rapid development is really, really good, really surprising. And also I found myself switching between VS Code and NeoVim as well.

Rust in Production

Zed with Conrad Irwin

1805.393

And how does TreeSitter work on a type level? Is it like an intermediate representation where you map certain keywords in different languages to the same keyword in TreeSitter?

Rust in Production

Zed with Conrad Irwin

1862.414

That's a very smart move. Where does the name TreeSitter come from? Is that because it's almost a recursive structure where you can think of it as a tree inside a tree inside a tree where you have different levels of abstraction that you can iterate on? Or does it come from the abstract syntax tree?

Rust in Production

Zed with Conrad Irwin

1914.009

It's sort of library where you can modify code based on certain, I would even say like a grammar or something where you can say, I want to do a code modification and I give it an expression and then it figures out what to do based on this expression. It's,

Rust in Production

Zed with Conrad Irwin

1934.913

more high level than a regular expression it's also more powerful i would say can you do certain things like this in z as well on a syntax level i know it's not exposed to the user but internally could you do such modifications

Rust in Production

Zed with Conrad Irwin

198.823

So every time I became sick of VS Code's laggy performance, I would switch to NeoVim only to find out that the configuration was a bit of a hassle. And so I have to switch back at some point. Exactly.

Rust in Production

Zed with Conrad Irwin

1990.059

Every day I get an update, which is nice because they work flawlessly and they work every single time. And I find myself reading the change log a lot because the change log is nicely formatted. You can see what's going on. I wonder how you do these updates. How does the pipeline work to create these updates? How do you push them to the clients? And how do you make it so flawless?

Rust in Production

Zed with Conrad Irwin

2.125

This is Rust in Production, a podcast about companies who use Rust to shape the future of infrastructure. My name is Matthias Endler from Corot, and today we're talking to Conrad Irvin from Zed about building a high-performance code editor in Rust. Conrad, thanks for being here. Can you quickly introduce yourself and Zed, the company you work for?

Rust in Production

Zed with Conrad Irwin

2088.556

The tree sitter is written in C and is wrapped in WebAssembly. That means you must run some sort of WebAssembly runtime. Is that a custom build or do you use anything?

Rust in Production

Zed with Conrad Irwin

2111.848

Is that also something that you use for the extensions?

Rust in Production

Zed with Conrad Irwin

2140.419

And will you support traditional extensions at some point too? And how will that look like? Definitely yes. And who knows?

Rust in Production

Zed with Conrad Irwin

220.68

Did that also entail any differences in how Z is architectured in comparison to other editors? Or was it just mostly Rust's performance that made it so snappy?

Rust in Production

Zed with Conrad Irwin

2231.283

I definitely appreciate the focus on stability and performance because those are the main two reasons why I use it. I would like to keep it this way. That's kind of nice.

Rust in Production

Zed with Conrad Irwin

2269.682

And once the project grows, it will not get easier because I just checked yesterday and Z is approaching 500,000 lines of Rust code, which is crazy. It's crazy. And I saw some interesting bits that I learned from you. For example, you have a flat hierarchy of crates. You have one workspace still. You keep it all in one workspace. Right. And then you follow a very flat hierarchy.

Rust in Production

Zed with Conrad Irwin

2298.864

Can you elaborate on this design decisions and maybe other decisions that are reasonable or maybe even necessary after reaching a certain size of like a code base?

Rust in Production

Zed with Conrad Irwin

2362.361

It's funny because lately I read an article by Matt Klett, who is the author of Rust Analyzer. And he mentioned this one thing about nested trees where you have to make a decision where you put things. And it's a conscious decision. It might be wrong. And so eventually you might end up in a suboptimal space, in a suboptimal structure of your project.

Rust in Production

Zed with Conrad Irwin

2388.217

So he advocated for a flat hierarchy too, where you don't even have to make the decision because, yeah, it's flat anyway. If you are wondering where to put it, the answer is put it into the root of your workspace.

Rust in Production

Zed with Conrad Irwin

2412.537

Any other such tips or perhaps even things that you would avoid now?

Rust in Production

Zed with Conrad Irwin

2470.054

And just to clarify for the people who are listening, this also happens if you just use these generics inside of your workspace in a different crate, because that's a separate compilation unit. And that means even just exposing it within your project might be problematic at times. And what about lifetimes? Because... you have a very high focus on performance.

Rust in Production

Zed with Conrad Irwin

2494.146

You want to make this thing as fast as possible. And one suggestion of various people that come from systems level programming languages like C++ and C is that you want to avoid allocations. You want to make everything a view into memory as much as possible. And you want to deal with the raw data as much as possible.

Rust in Production

Zed with Conrad Irwin

2514.394

Is that something that you have to follow to reach that level of performance or are there ways around it? So for the hard code paths, yes, for sure.

Rust in Production

Zed with Conrad Irwin

2574.85

And when you run into a problem with performance, what's your approach? Do you benchmark that before you make any changes or do you just guess where the bottleneck is and have an intuition for it?

Rust in Production

Zed with Conrad Irwin

2623.445

By frame, you mean what? A frame of memory in the kernel? A frame of pixels to update. Ah, okay. Do you use a lot of macros for code generation, or is that another thing that you tend to avoid in the hot paths of the code?

Rust in Production

Zed with Conrad Irwin

2646.783

And that's for ergonomics reasons or for other reasons?

Rust in Production

Zed with Conrad Irwin

2667.399

When you ported Z to Linux, were there any surprises that you hit other than the mentioned issues with dropping frames?

Rust in Production

Zed with Conrad Irwin

2778.655

I learned that it also compiles on Windows. Do you want to comment on that?

Rust in Production

Zed with Conrad Irwin

2833.78

When you explained that, I wondered, how would I test that? I would have a really sophisticated test environment for different environments. Do you test it in VMs? Do you test it just with unit tests or manual testing? How does that part work? Testing in general or cross-platform testing? Interested in both, yeah, but specifically cross-platform. Okay.

Rust in Production

Zed with Conrad Irwin

2901.543

Do you focus on unit tests or integration tests for the rest of the code base?

Rust in Production

Zed with Conrad Irwin

2943.718

How do you communicate with the server? JSON? Protobuf. Why exactly do you use Protobuf and not anything else?

Rust in Production

Zed with Conrad Irwin

299.15

Right, so the editing part works on the CPU, I would assume. That's the tree set apart. And the rendering part of the UI that works on the GPU, is that correct?

Rust in Production

Zed with Conrad Irwin

3010.495

There are a few things that come to mind. One is Postcard by James Muntz, who, it has a slightly different focus. It's serialization format, yeah, but it's not based on Rust structure as far as I remember. Then there's Seabore, which is another serialization format. I honestly don't know what that wire format looks like, but I think there's also one that is based on Rust structs themselves.

Rust in Production

Zed with Conrad Irwin

3054.352

I think the one that I meant was called Arson. Okay, no, that's different again. It's like a JSON-like thing, but with Rust structs. Because the one issue that I found with protobuf was that you need to carry the definition file. You need to put it somewhere, and then you need to compile your stuff against whatever protobuf definition you have somewhere.

Rust in Production

Zed with Conrad Irwin

3077.865

And that can be a little annoying in the workflow.

Rust in Production

Zed with Conrad Irwin

3098.374

Yeah. Shout out to James for building that. I took a look at the issue tracker and I found that one of the most often, if not the most often requested features that's missing in set right now is debug support. And a lot of people might say, well, why haven't they added it just yet? And how can it be so complicated? Can you say a few words about that? Sure.

Rust in Production

Zed with Conrad Irwin

3200.175

Which languages work best with this new protocol?

Rust in Production

Zed with Conrad Irwin

3222.404

Nice. I'm really looking forward to that. Yeah, you and about 500 other people, I think, based on the outputs. The pressure's on, but I'm sure that when it hits, it will be fine because this is how I experienced this editor or this approach so far. It's always very well thought through, which is great. And speaking of which...

Rust in Production

Zed with Conrad Irwin

324.045

And is that something that you have to handle on the Rust side or does that more or less evolve automatically when you build the application with that in mind? Is that something where, for example, you have a hypervisor for the GPU and then you have some other thing that takes care of state of text files that you have currently loaded? Or is that something that more or less happens automatically?

Rust in Production

Zed with Conrad Irwin

3244.361

About things that look easy on the surface but are hard in hindsight, is there any peculiar bug that you remember? Anything that people take for granted but in reality is very hard to pull off?

Rust in Production

Zed with Conrad Irwin

3307.256

Yeah, most text editors would even crash at this point or they would not even get to that point.

Rust in Production

Zed with Conrad Irwin

3373.372

Exactly. And it's also elegant because if you use two big vectors, you probably have some jank on the interface between the two or like in between the two when you jump from one block to the other. But if you use a smarter data structure, you kind of circumvent that issue altogether.

Rust in Production

Zed with Conrad Irwin

3430.478

It sounds like a very hard problem that you have to figure out once, but then you never have to touch. Are there other things like this in the editor?

Rust in Production

Zed with Conrad Irwin

3450.614

yeah beyond that it's it's hard to say i think the yeah i think the crdt it's one of the few parts of the code base where i basically never find myself there because everything just works which is nice let me tell you about my first interaction we've said i had a problem with vim support and i went into the issue tracker and i found an issue that exactly described my problem and

Rust in Production

Zed with Conrad Irwin

347.759

Yeah.

Rust in Production

Zed with Conrad Irwin

3475.371

And so I read the last couple of comments. And what I found interesting was that you, Conrad, reached out to the people in this issue and said, I'm open to hack on this together. That was the first time I ever saw this level of interactivity with any project, because it's not only...

Rust in Production

Zed with Conrad Irwin

3495.186

Through issues, you would invite people to block time in your calendar to use the tool you're going to improve together and work interactively. Is that something that you do a lot? How does that influence your workflow?

Rust in Production

Zed with Conrad Irwin

3633.879

If someone out there wants to contribute to Zed now, how do they get started? Very simply, look in the issue tracker.

Rust in Production

Zed with Conrad Irwin

3663.72

We're coming to the end and it's become a bit of a tradition around here to ask this one final question. What will be your statement to the Rust community?

Rust in Production

Zed with Conrad Irwin

3686.855

Very nice final statement. Conrad, thank you so much for taking the time. It was amazing.

Rust in Production

Zed with Conrad Irwin

3697.267

Rostium Production is a podcast by Corot. It is hosted by me, Matthias Endler, and produced by Simon Brüggen. For show notes, transcripts, and to learn more about how we can help your company make the most of Rost, visit corot.dev. Thanks for listening to Rostium Production.

Rust in Production

Zed with Conrad Irwin

388.621

Someone might listen and think, oh, why didn't they use Leptos or Deoxys or all the other Rust UI frameworks? Why did they have to invent their own thing? What would be your answer?

Rust in Production

Zed with Conrad Irwin

454.284

And absolutely, you can feel that when you use it because it's snappy. It feels native. That, by the way, was one other thing that I always missed in NeoVim. It didn't really feel like a native application. It felt like a terminal emulated thing that ran inside of, you know... Some terminal, of course, which it kind of was, but that always kept me away from other things like Emacs, for example.

Rust in Production

Zed with Conrad Irwin

46.024

It's pretty amazing. I have to say, I'm a set user myself. I completely switched from VS Code. And I can tell you the experience so far is fantastic. You did a great job. And this is also why I wanted to talk to you folks. First off, in your words... What's wrong with the existing editors? What are some pain points? Why do we need another editor?

Rust in Production

Zed with Conrad Irwin

479.394

I do like all of these experiences, but I also want the native look and feel because especially on macOS, if you're used to this, it's very hard to switch away from that experience again. Yeah, I strongly agree.

Rust in Production

Zed with Conrad Irwin

515.139

Yeah. Let's see, which keyboard shortcuts do you support? What sort of keyboard key maps, I would say, do you support? You support Vim. Then you support the normal command or control-based keyboard chords, almost. Then you have actual chords, which are things like GD or GR, anything else that I'm missing.

Rust in Production

Zed with Conrad Irwin

575.703

Well, when you describe it, it sounds kind of straightforward, but you have to plan for this from the very beginning, because otherwise you will not be able to manage to support all of these different ways of input, right?

Rust in Production

Zed with Conrad Irwin

614.301

Can you just quickly and briefly describe to us how that part works, how that part of set the keyboard input works? Because in my mind, it's event based. You have things like you definitely don't want to block the rendering in any way. You probably need to do that asynchronously or event based. But I don't want to put words into your mouth. I want to hear from you. How does that part work?

Rust in Production

Zed with Conrad Irwin

68.726

I guess you hear that a lot, but I want to hear the answer from you. Makes sense.

Rust in Production

Zed with Conrad Irwin

724.318

And all of these events, they end up in some sort of state machine, or are they more or less modifying the state and then they are more or less gone from the system again? A little bit of both.

Rust in Production

Zed with Conrad Irwin

778.135

And this is probably also how you circumvent issues with self-referential structs in Rust where maybe you want to, you know, you described a mechanism where you had an event that would trigger another event and you would have a callback upon a callback maybe. And these things, they trigger some sort of PTSD in my mind because...

Rust in Production

Zed with Conrad Irwin

801.48

If you do it the wrong way, then you will end up in a thing that doesn't compile anymore. And if you kind of have a dispatcher in between, you can completely get rid of this problem because asynchronous solves that problem for you. Is that correct?

Rust in Production

Zed with Conrad Irwin

862.998

Are there any issues that you defer to runtime or is all of that done at compile time?

Rust in Production

Zed with Conrad Irwin

898.098

It'd be really hard to check. What are the additional type safety guarantees that you mentioned in your own implementation of this Arc alternative?

Rust in Production

Zed with Conrad Irwin

932.749

Right. Is that something that I would be able to use as an external person, maybe as part of my application? I know that you open source the entire code, but is that something that I could use in any other context?

Rust in Production

Zed with Conrad Irwin

966.221

Right. So these are abstractions that you built specifically for GPU UI and things that are paper cuts in your working environment and you just had the power to do it. So you went ahead and did it. Exactly. And so, yeah, it gives us a whole bunch of nice, nice guarantees.

Rust in Production

Zed with Conrad Irwin

984.421

Is that a very common pattern, I'd say, where maybe the ecosystem is just not there yet, or you have very specific requirements, so you have to build it yourself? Or does the ecosystem help you a lot?