Why You Shouldn’t Build Your Next App in Rust

āđāļŠāļĢāđŒ
āļāļąāļ‡
  • āđ€āļœāļĒāđāļžāļĢāđˆāđ€āļĄāļ·āđˆāļ­ 16 āļž.āļ„. 2024
  • In this video, we will explore why programming a UI in Rust is so hard and what are some of the possible solutions if you are looking to build an app in the Rust programming language. ðŸĶ€ðŸ‘Đ‍ðŸ’ŧ
    You see Rust being talked about EVERYWHERE and for good reason. Something that isn't so obvious is how hard it is to create a User Interface (UI) with it.
    We will look at how Rust’s unique memory management model and lack of inheritance make it difficult to use traditional object-oriented programming patterns for UI development. We will also see how some Rust frameworks and libraries are trying to overcome these difficulties by using different approaches, such as functional programming, entity-component-systems, immediate mode GUI, and even the DOM.
    If you are interested in learning more about Rust and UI programming, this video is for you!
    Written Version 📝
    www.warp.dev/blog/why-is-buil...
    LINKS
    -----
    Try Warp now for FREE 👉 bit.ly/warpdotdev
    Twitter ðŸĶ
    / warpdotdev
    TikTok ðŸ“ą
    / warp.dev
    TIMESTAMPS
    ---
    0:00 Why Rust is Loved
    0:34 What Makes Rust So Unique?
    1:45 How UI Programming (Usually) Works
    2:46 How Rust Makes This Hard
    4:21 Attempting UI Design with Rust
    5:34 How We Are Tackling Rust with UI
    6:10 ELM Architecture
    7:26 Entity Component Structure
    7:58 How We Are Building UI
    9:03 What Are Your Thoughts?

āļ„āļ§āļēāļĄāļ„āļīāļ”āđ€āļŦāđ‡āļ™ • 272

  • @warpdotdev
    @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +51

    Are you using Rust to build UI? ðŸĪ” Let us know!

    • @challow90221
      @challow90221 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

      I’m just starting to know the languageâ€Ķ so are you saying that rust isn’t up friendly?

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +11

      @@challow90221 Rust is awesome and you should learn it! It's just in the early stages of building UI :)

    • @challow90221
      @challow90221 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

      @@warpdotdev thanks. I meant to say “UI” not “up” lol I’m glad you figured out my blunder.

    • @matthiskalble3621
      @matthiskalble3621 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      Yes, and it is quite pleasant imo, for example in dioxus you can basically write html in a macro and is just works
      Macros are the backbone as far as my opinions go (generate boilerplate from html like language)

    • @DeathSugar
      @DeathSugar 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +6

      > Rust is not OOP
      It is OOP, just don't have regular inheritance.

  • @woozy_deer
    @woozy_deer 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +277

    Get ready for a Primeagen reaction

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +36

      We’re ready

    • @bArium5656
      @bArium5656 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      Waiting

    • @joshuasarmiento7665
      @joshuasarmiento7665 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +4

      @ThePrimeagen

    • @smash3689
      @smash3689 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +16

      3:16 wll trigger him so bad

    • @soonhongng7037
      @soonhongng7037 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +9

      hah you mean waiting for the reaction of the cringy opinionated man?

  • @CodingWithLewis
    @CodingWithLewis 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +107

    "Imagine having a button that doesn't do anything when you click on it".
    This is how my apps work now

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +7

      We've all been there....

    • @lakshitgupta3025
      @lakshitgupta3025 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Commenting before this comment blows up

    • @principleshipcoleoid8095
      @principleshipcoleoid8095 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +6

      Isn't this better than a button that does do a wrong thing when clicked, but only sometimes?

    • @callbettersaul
      @callbettersaul 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      @@lakshitgupta3025 Still waiting for the comment to blow up.

    • @eamonburns9597
      @eamonburns9597 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@lakshitgupta3025 Still waiting...

  • @kirglow4639
    @kirglow4639 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +139

    Lack of inheritance puts no restrictions on how UIs are built. If anything, there's more and more trend towards getting rid of inheritance and OOP in general (take react hooks for example). What's challenging in Rust is sharing of mutable data. If 2 components can modify the same view / same data (e.g. clicking menu icon can open a menu, and clicking close button or overlay can close the menu), that means both components need mutable references to the same data, which is disallowed in Rust. This is solved, usually through RefCell or something like it, but it's not as easy as in other languages, though I'd say every UI framework has already come up with good solutions for this and many have decent DX. I don't think the argument about inheritance makes any sense, and criticizing one example of trait implementation doesn't lead to a general conclusion that Rust is too limited for building UIs in any way. Rust doesn't have less capabilities than other languages, but Rust has less magic and fewer ways of shooting yourself in the foot. If you want to understand and fully control the memory and speed of your application, I'd say Rust is actually preferable.

    • @kaihsiangju
      @kaihsiangju 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

      As you said, the issue is that it is not as easy as in other languages, so you have to come up with different approaches, which is the main point of this video explaining why it is difficult and how to resolve it.

    • @32zim32
      @32zim32 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Rust is not too limited but it is not suitable for building UIs. That's correct?

    • @32zim32
      @32zim32 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +5

      Inheritance is very very handy when designing such systems and rust just throws it away and don't give you any good alternatives to do it. I think the core team and many fans of rust are just haters of OOP and they will never agree that sometimes OOP is really useful. They just throw it away completely without giving you any good alternatives

    • @kirglow4639
      @kirglow4639 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +8

      @@32zim32 no. Rust is perfectly suitable for building UIs. If you want more magic and less control, Rust might not be the best option, but if you want more control over speed and memory, Rust is a great option. Even that is not exactly correct, because Rust has libraries that abstract away low level details and give you a lot of magic instead. So, Rust is good in either case, just beware that Rust gives you more control that you may not be used to.

    • @32zim32
      @32zim32 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      @@kirglow4639 time will show. Right know we don't have mature rust UI libraries with big success stories

  • @gotbread2
    @gotbread2 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +99

    This is ironically a common Trend I see in more complex rust programs. Using owning relations gets prevented by the borrow checker, so people invent this "index into an array" method, to circumvent the borrow checker. Issue is, then you kinda reinvented pointers, only that the rust system does not "know" about them and thus cannot check them. This also means there is no mechanism preventing you from accidentally using the wrong index into the array. This is similar to the memory bugs rust tries to avoid, just one level higher.

    • @Speykious
      @Speykious 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +7

      You can only use the wrong index into an array if you remove elements in a way that everything after the removed element has to be moved. But with normal pointers, it also happens when your vec is reallocated. There's still a problem being solved.

    • @gotbread2
      @gotbread2 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      @@Speykious If each element had a vector of pointers to their child elements, you can remove elements safely and still be sure that the tree structure is not damaged.

    • @kirglow4639
      @kirglow4639 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +15

      It's not the same as pointers in that you won't experience undefined behavior. You can argue that panics are just as bad, but that's the whole thing about Rust: it only guarantees lack of UB, not panics.

    • @HyperFocusMarshmallow
      @HyperFocusMarshmallow 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      I mean, rust has pointers if you want them. It just requires unsafe to dereference them.
      If someone does a lot of stuff just using a method taking an index, why not just use a reference with a lifetime straight up? I guess it takes people a few weeks or months to get that if they come from programming languages that don’t have lifetimes, but still.

    • @christianm4906
      @christianm4906 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      That sounds like a lot of headaches.

  • @user-vn9ld2ce1s
    @user-vn9ld2ce1s 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +24

    Personally i like the "egui" crate the most. You create UI elements not by creating objects, but by calling functions. Your code sits inside a big closure that is called each frame, therefore your UI is rendered every frame - no need for component management, if you don't want to draw something based on a condition, you just put the drawing call into an `if`.

    • @invinciblemode
      @invinciblemode 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +8

      Sounds not performant

    • @user-vn9ld2ce1s
      @user-vn9ld2ce1s 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +5

      @@invinciblemode It does take more resources, but for my usecase (mostly simple apps composed of regular widgets and simple drawing into canvas), it's more than fast enough.

    • @thekwoka4707
      @thekwoka4707 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      So basically react but slower?

    • @user-vn9ld2ce1s
      @user-vn9ld2ce1s 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +7

      @@thekwoka4707 I don't know if it's faster or slower than React, but since it is native code (or wasm), it won't have the overhead of a JS interpreter. I don't pretend to know how react works, so i'm not to judge.

    • @invinciblemode
      @invinciblemode 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

      @@user-vn9ld2ce1s this is just a classic case of not everything WASM is better if the architecture is flawed to begin with. Nothing is more performant than JS when it comes to managing UI that uses native browser DOM nodes.
      If you’re not using DOM nodes (think apps like Figma, SketchUp, photoshop, webGL, etc) then WASM brings native desktop level performance to the browser (in those use cases only!)

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +7

    More content like this please, getting fireship vibes here nice balance of educational and fun

  • @jaysistar2711
    @jaysistar2711 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +77

    Rust does not "lack" object oriented programming. It supports it in almost the same way that C++ does, even with multiple inheiritance. Instead of "extending" a class, you just have another struct as a member. To make the "derived" class act like one of it's members, impl the Deref trait to allow it to be borrowed. This use is what the Fyrox game engine uses. Please don't make it more difficult to find Rust programmers for hire buy discourraging its use. We need more Rust programmers.

    • @khatdubell
      @khatdubell 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +13

      Exactly.
      OOP is about keeping functions that operate on data, with that data.
      Its about dealing with data at a higher level of abstraction (the interface or trait) rather than directly manipulating it yourself.
      Rust supports this.

    • @AbuAl7sn1
      @AbuAl7sn1 9 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

      sister you genius

    • @AshishSinghh
      @AshishSinghh 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      like Golang?

    • @jaysistar2711
      @jaysistar2711 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      @@AshishSinghh While Go has inheritance by not giving a member a name, Rust gives the member a name and an impl of Deref lets you use the type as if it were another, so Deref is applicable to more than inheritance (the "new-type" pattern, smart pointers, etc.).

    • @TehKarmalizer
      @TehKarmalizer 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +4

      I’ve never seen anyone mention the Deref trait. Ever. Thank you for mentioning it. It could be so useful.

  • @stzi7691
    @stzi7691 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +26

    In the AMIGA days there also was no object oriented Model for doing GUIs, but AMIGA had GUIs, Windows a long time before Microsoft Windows was a thing. There are C-libs for graphics out there like raylib or OpenGL that also need to update alot of events and have to organize that. With C you need to build your own structures and data organization, because C is a very primitive language. So the big picture could yield from the question: How did they do this with those minimal resources, and how can we transfer this to the Rust-world? Another good sort of information would come from game programmers like for instance Casey Muratori. With the object oriented approach you miss the cache alot. So I think a Module based approach is better, like you are already following. A Module that handles all the drawing in the GUI framework can utilize the CPU cache well better, reducing performance-headaches. There are, frankly better, solutions out there that do not need object orientation at all. So it is definitively doable.

    • @chudchadanstud
      @chudchadanstud 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      And they were all horrible to use. Seriously have you actually used them? Why donyou think they were replaced in the first place

    • @user-uf4rx5ih3v
      @user-uf4rx5ih3v 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Back in the day, most people used terminal applications not gui's. Building actual gui's was extremely painful, time consuming and expensive. The OO model was developed to deal with this problem. Initially OO was used in libraries that constructed objects and methods. This proved to be not so ergonomic and since people thought that gui's are the future, the model was built into languages like objective C, C++, Java and C#.
      Actually, the elm model is quite nice to use. It's not really functional, it didn't come from functional languages but it was easy to implement in functional languages like Haskell. Similarly, I guess it's also convenient in Rust? (I've never built a gui in Rust, so I don't know.)

  • @LiliumAtratum
    @LiliumAtratum 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I am a C++ programmer, but I am looking for ways to implement GUI with an ECS as well. I believe it can be done in a way that code is fast, and API is easy for the user.

  •  6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +5

    Anything OOP can do, traits can do better.
    The mutability thing is not really a problem in Rust.
    Problems with references and the borrow checker? Use smart pointers. Accessing smart pointers is very performant, like accessing references (without optimizations).
    Iced is amazing, but still lacks many features.

  • @TON-vz3pe
    @TON-vz3pe 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +5

    Isn't this a click bait? You didn't explain why we shouldn't use Rust and started explaining all Rust features.

  • @wilder6408
    @wilder6408 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

    Can you elaborate more on the Entity Component Structure method? What sort of GUI library for Rust does this? Did you have to write up your own?
    If so does this mean other people writing Rust GUI should stick to the Elm-inspired libraries like Iced?

    • @thekwoka4707
      @thekwoka4707 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      Bevy does. And you can do GUI in bevy without it needing to be a game...

  • @th3mon
    @th3mon 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    Sorry for nit pick. ReactJS isn’t a programming language -> 3:19

  • @michaelschnell5633
    @michaelschnell5633 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Currently I am starting to create a VST3 (or maybe Clap) DAW plugin featuring a GUI in Rust.
    Hence the HUI framework needs to get the Window context from the DAW via the plugin API.
    Once I am able to a non-GUI plugin I will start evaluating GUI frameworks, supposedly starting with ICED.

  • @HyperFocusMarshmallow
    @HyperFocusMarshmallow 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    You can do a lot more in rust than is apparent right out of the box. I bet you could theoretically do classes with inheritance using macros and you can use data structure with interior mutability as mentioned in the video or if you really want to you could “unsafe{}” it all and build your own model on top of that. You could even implement a garbage collector if you really wanted to.
    It’s just that rust can give you some nice guarantees if you figure out how to do things according to the safe borrow rules, and to be honest, you might have to do a lot of work to get some of those other things going, on par with designing your own programming language. To be fair, gui libraries are almost that anyway, with how much terminology is required to reason about them.
    There is a lot of experimentation going on in the gui space currently and it’s very fun to follow.
    Even if it might be worth while to wait a bit before betting on rust gui if you want to do anything really serious, I don’t think things will stay that way for long.

    • @user-uf4rx5ih3v
      @user-uf4rx5ih3v 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      The thing is that macros are really difficult to use in my opinion. They're best left as "magic" that the programmer doesn't have to think about. What you're proposing is can only work with heavy use of macros and traits, some of the hardest things in the language.

    • @HyperFocusMarshmallow
      @HyperFocusMarshmallow 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@user-uf4rx5ih3v I think I agree. (Guessing you refer to the part about classes and inheritance). I don’t recall the whole context of why I wrote the comment.
      Using macros can be easy, it can be hard. It depends on the macro. Writing simple ones is quite easy but requires a slightly different skill than using them. Writing macros that would do classes and inheritanceâ€Ķ would take some work for sure.
      I’m not advocating that everyone and their grandma should do this on their own in their projects. I’m probably not advocating that people should do it at all.
      But just in principle if someone does write some set of macros that allow code that works like classes with inheritance, you could just add that library to your project and use the macros. Maybe there is a design that would make the user experience easy. At least as easy as the notion of classes and inheritance, which maybe isn’t simple in itself.
      I’m not advocating this. It might be a terrible idea. Probably is.
      You can tell me if it sounds like we agree. 👍

  • @ZoroastrianCowboy
    @ZoroastrianCowboy 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    What about Druid framework for Rust GUIs? Are they any good?

  • @Milky____
    @Milky____ 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I love your channel and look forward to warp, hope it can have cute background imgs like Windows terminal 🙏

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      Thank you!

  • @MartiQwx
    @MartiQwx 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Both pleasant to watch and listen, and most of all it's spot on topic

  • @codetothemoon
    @codetothemoon 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +7

    Fantastic video. I’m not sure I fully followed everything, but I think that’s mostly on me. Do you think the issues you raise are those that UI developers have to contend with or just framework developers? I feel like procedural macros fill in some of the gap left by the lack of inheritance

  • @martingeorgiev999
    @martingeorgiev999 9 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    Rust probably has more object-oriented features than your average Java clone. There are traits (powerful interfaces) instead of abstract classes, and "inheritance" is achieved through them; that is, every struct that implements a trait X de facto "inherits" it so it can be dynamically dispatched to a trait X object. It's really just a more recent and flexible approach.

  • @a314
    @a314 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    ID is the short form of identity. It's ironic that identity ID is used in warp at 8:10 that literally means Identity Identity 😅

  • @DaviAreias
    @DaviAreias 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +10

    This is why Tom is a genius and you should build your app on JSDL

    • @saysthetedd
      @saysthetedd 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      We need to stop wearing this joke down to the bone

  • @luiscarlosjayk
    @luiscarlosjayk 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Wanted to ask, what do you use to create your videos? (this one looks very cool, congratz)

  • @user-sp4fz1gw9w
    @user-sp4fz1gw9w 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Thanks for explaining Rust

  • @CramBL
    @CramBL 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    I've not run into these "big headaches" writing GUIs in Rust. Event handling and message passing is so easy in Rust. My GUIs typically use a tree structure and the root component has an event loop where it receives events and dispatches them to sub-components that handle the events that they can handle in their event loops. No need for interior-mutability.

    • @MrChelovek68
      @MrChelovek68 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Why you don't use for this brainfuck?

  • @mozescodes6618
    @mozescodes6618 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Omg someone mentioned Elm! I work with Elm quite a headache tbh.

  • @thfsilvab
    @thfsilvab 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +19

    I didn't quite catch the relationship between hierarchy in OOP, the component tree (a.k.a. tree data structure), and the lack of inheritance in Rust. It's completely possible to build a tree structure in Rust, just like your example for React or how it's done in Angular. If the lack of a common type is the problem, you can use "dyn Component" which should work as a common trait for all components. I'd appreciate if you could elaborate a bit on this, because the way it's explained in the video might misinform people.

    • @thekwoka4707
      @thekwoka4707 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      Same. I don't get how rust being different is harder...

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      Hey! Thanks for asking. If you want more technical details and code snippets, check our our written blog here:
      www.warp.dev/blog/why-is-building-a-ui-in-rust-so-hard

    • @thfsilvab
      @thfsilvab 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@warpdotdev thank you a lot for clarifying!! The article explains more clearly the problem, and even addressed possible solutions. Coding in Rust is indeed challenging after years of the Java way of OO in the majority of OO languages, while many frameworks do exactly what is described in the article (mutate the base class property for example), many would say it's a bad approach of doing things, and while there are workarounds for that in Rust, I don't think it'd be idiomatic. Awesome work on this!

    • @timwhite1783
      @timwhite1783 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      You were a lot more polite than I think I would've been. Was about to point out that class hierarchy is a different concept to the tree like DOM structure react uses. You could implement such a tree like structure in Rust but admittedly there still are some somewhat unwieldy aspects to that due to how borrowing and ownership works in rust (in all likelihood you'll struggle to create a tree which you can modify easily and safely)

  • @Alex-hr2df
    @Alex-hr2df 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +4

    I agree on everything in this video. Building GUI with Rust frameworks/tools is over ambitious. Perhaps it's too early for that. I separate FE from BE. I use Go/Rust for BE and React/Flutter for FE - the best so far IMO.

    • @AdamFiregate
      @AdamFiregate 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Spot on. I also built separately, FE in JS and BE in Rust.

    • @rafaeldasilveira9860
      @rafaeldasilveira9860 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      have you ever tried leptos+htmx (for rust) or templ+htmx (for go)?

  • @arghyadas4138
    @arghyadas4138 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +6

    Found your channel from coding with Lewis and I subscribed 🙌
    The quality of video is ðŸ”Ĩ
    The knowledge given is ðŸ”Ĩ
    Thanks and bring more content like this

    • @aryanshaw616
      @aryanshaw616 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      Bhai ye uski kuch lgti kya editing quite similar h ?

    • @arghyadas4138
      @arghyadas4138 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@aryanshaw616 baat toh hai
      Kya malum

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      So glad to hear this. Thank you!

  • @shankrunch
    @shankrunch 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    Like the explanation of OOP in UI rendering

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      Hope the animation helped 👍

  • @naczu
    @naczu 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +6

    I really don't understand why you compare Rust and React. Rust is low level programming language, React is a js library. How do you compare these two ? I have never seen comparison between C and React or C++ and React. Maybe your next video title will be comparison between HTML and Java ðŸĪĢ

  • @ivanandraschko6330
    @ivanandraschko6330 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I love your content, thank you so much for sharing it,

  • @gertjanvandenbroek1620
    @gertjanvandenbroek1620 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    Interesting take. I'm new to rust and really enjoy it. Now that I've thouroughly indoctrinated in the crustacean ways. I'm in the mood for some criticism and learning about the pitfalls of rust. Most videos I found were just masked rust propaganda or people that didn't seem to get the point of rust.
    Glad to have bumped into this video. This was a breath of fresh air with a well explained and pretty unbiased.
    That gets you a like!
    And the policeman crab with the moustache earned you a sub.ðŸĶ€

  • @wesleyhamilton6262
    @wesleyhamilton6262 9 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

    probably a stupid question but why not use something else to build the ui and use rust for everything else ?

    • @lardosian
      @lardosian 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Not a stupid question!
      Maybe the video is trying showcase doing full stack with only Rust.

  • @kinggeorges625
    @kinggeorges625 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    Linus Trovald in a recent interview said that, Rust is not used in Linux Kernel as stated at the beginning of this video.
    There’s no need actually to replace C by Rust. Since C is a better language when it comes to interact with hardware

    • @jayachandpranav
      @jayachandpranav 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Bro it's open-source, just take a look

    • @svenyboyyt2304
      @svenyboyyt2304 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Rust isn't in the kernel, but it is better.

  • @magnusmarkling
    @magnusmarkling 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Very well informed video!

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Glad you think so!

  • @FineWine-v4.0
    @FineWine-v4.0 9 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Then I guess we need to wait for Iced

  • @rossdafodil7931
    @rossdafodil7931 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    i like warp, but why go the route of accounts? just curious

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      Hey! Good question.
      The primary reason is that login allows us to build cloud-oriented features that make the terminal have a concept of “your stuff” and “your team’s stuff” - for example Block Sharing. This is the same reason other collaborative apps like Figma and Github require login - identity is the basis of building cloud-native apps.
      That said, we understand the desire to try Warp before logging in, and are exploring product experiences that will allow users to preview Warp before signup.

    • @rossdafodil7931
      @rossdafodil7931 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@warpdotdev that makes a lot of sense. it was always kind of a turn off for me when i was trying warp, but ill def give it another try now that i know its not JUST telemetry.
      thank you very much and keep up the good work

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@rossdafodil7931 Nice! By the way, our telemetry is opt-out. Here's the documentation on how to disable it, if you want.
      docs.warp.dev/getting-started/privacy#how-to-disable-telemetry-and-crash-reporting

  • @LugayiziIsma
    @LugayiziIsma 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I would very much want to hug wichu for a better understanding of this lang u seem so cool like knowing so much about neural formation of this lang 🎉

  • @johnnydoey7920
    @johnnydoey7920 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +4

    I agree overall, most of the time and energy is spent on making Rust a good backend or systems programming language instead of a good front end language. Rust feels underdeveloped in this regard

    • @BboyKeny
      @BboyKeny 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

      I think web assembly is also a bottleneck for this. Although in my opinion leptos and yew are also nice flavours if you know solid or react/next. We might get a really nice full stack solution from Rust.
      Meanwhile the tooling for the frontend is still being innovated on through Rust at the moment.

    • @ironhammer4095
      @ironhammer4095 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@BboyKeny Thumbs up for mentioning Leptos!

  • @EduardKaresli
    @EduardKaresli 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    How is writing GUI libraries in Rust more difficult than writing them in plain C? Most GUI libraries were written originally in C, not even in C++, and in C you don't have any OOP.

  • @victorpinasarnault9135
    @victorpinasarnault9135 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    What about Zig language?

  • @principleshipcoleoid8095
    @principleshipcoleoid8095 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

    Honestly I'm not building UI myself. Using Bevy's ui for ui and egui for debug ui tools.

  • @user-qr4jf4tv2x
    @user-qr4jf4tv2x 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    game dev and web dev is the thing that will propel rust

  • @Xaxxus
    @Xaxxus 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    SwiftUI is all built with structs. I imagine you could do something similar in rust.

  • @Ccb780
    @Ccb780 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    Are we gui yet? Close enough...

  • @ShiNijuuAKL
    @ShiNijuuAKL 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Yeah, during the whole video I was just thinking: ".... we can just do it like elm does" I wasn't expecting ecs tho, even though I got interested in rust because of bevy

  • @brianbrian3031
    @brianbrian3031 9 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I was thinking how you could look into the camera while talking so people feel like you are talking to them...
    How about you create a dead zone in the middle of the monitor. Set up your camera in the dead zone. 😊

  • @juanjosecruzortiz111
    @juanjosecruzortiz111 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    I wouldn't want to create a ui in rust, just a backend that returns json data, and I would delegate the front-end to any framework of your choice, React, Vue, Astro, Svelte, Flutter, you name it

    • @alarie0
      @alarie0 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      this is what tauri does

  • @mib32
    @mib32 9 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Why you did not went with Electron? I launched Hyper and on startup it takes same amount of memory as Warp

  • @gro967
    @gro967 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Would be great to compare it to something modern in web development not something like React that has so many essential issues, where the main one is the whole render model...

  • @Yupppi
    @Yupppi 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I've seen people write an assembly or another language block inside rust code, maybe GUI is best done that way. Like letting rust do what it does the best, run core code really fast and safe, but separating the GUI to something evil rust shouldn't touch. After all, isn't multiple languages in a project a very common thing already? Like most of the time for web stuff you just have to step into the javascript world to save yourself from more pain.

  • @carina_akaia
    @carina_akaia 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I'm learning Dioxus at the moment

  • @andrewgr144
    @andrewgr144 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    I guess I'm just missing the point. If you want to build a user-mode app with a GUI, you use C# or . Why would you even consider Rust or C or C++? I mean, I guess if you're writing code for a super resource-constrained system, but that's a pretty specialized niche.
    Microsoft is using Rust for what it's best at: system level programming. They're doing Azure development in Rust, as well as re-writing some of the Windows system binaries in Rust. And if a developer doesn't want to worry about memory management, they have no business writing a device driver or a kernel binary.
    This just seems like a moot point. It's addressing a straw-man scenario. Or, I guess I should allow for the possibility that the world is a weird place, and there are strange people who do inexplicable things. Are there really people that voluntarily choose to write GUI apps in Rust? What's their motivation? The extra performance simply doesn't matter, at all. On the other hand, is there anyone seriously arguing that Rust isn't a very valid, and perhaps even objectively correct, choice for systems level programming? I mean, I did my share of kernel development in C 25+ years ago, and to this day it's the language that I am most comfortable in, but surely even the most die-hard C or C++ developer would allow that Rust is at least a nice option?

    • @taylrthegreat
      @taylrthegreat 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      I want everything written in rust just so we can say it was written in rust

  • @coffee-is-power
    @coffee-is-power 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    I'm using rust a lot in the backend, it's a life saver for me. To build uis for the web though... Not so much.
    Also if you need to build desktop apps rust is definitely a good choice to use in the place of c++.

    • @snapcaselled1201
      @snapcaselled1201 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      what do you mean? backend = web right?

    • @coffee-is-power
      @coffee-is-power 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      @@snapcaselled1201 yes

    • @christianm4906
      @christianm4906 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      I don't think Rust even comes close to C and C++ in terms of desktop applications for 2024. That situation might change in a decade, or perhaps it will never happen. Just look at the most popular desktop environments for Linux, such as KDE and GNOME; most of them use C and C++ libraries like Qt and GTK. Despite efforts to port these libraries to Rust, it remains-and will likely always be-a second-class language in this domain.

    • @coffee-is-power
      @coffee-is-power 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      @@christianm4906 people use html, css and js to build UIs, which absolutely sucks, rust still better than that

  • @oglothenerd
    @oglothenerd 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    Why is Warp, a terminal, proprietary!?

  • @menzoberranzam
    @menzoberranzam āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Excellent video!

  • @sawood2010
    @sawood2010 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    I only have Web UI experience, mostly in angular 7-15. Flexibility is the main thing to get from a frame work. Ive worked with symfony/ twig, laravel/ blade, alpineJS, and xamarin.
    I like a framework to handle routing, navigation, etc. But in the end vanilla JS with JSDocs is just best for DOM manipulation. As much as Javascript drives me insane, I always get to a point to where I need plain 'ol Javascript to accomplish something special. If you want a custom ckeditor, then you still have use vanilla JS. Angular 15 compiling to JS still isn't perfect. I'm eyeing Phoenix + AlpineJS for my next project.

  • @DougLopes
    @DougLopes 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    So, instead of inheritance you make composition... I think?

  • @HelloThere-xs8ss
    @HelloThere-xs8ss 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +4

    Js is for the Dom and it should stay that way. Each language has its strengths and rusts' is in threading and memory management, along with a few others from what I know now

  • @tacorevenge87
    @tacorevenge87 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    As a mathematician I come from c++, python (ML and DL) . Love rust just because ML and DL will need to be productionised at some point.

  • @kamertonaudiophileplayer847
    @kamertonaudiophileplayer847 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I think Rust object composition clearly works. You good pointed to some potentially problems, but there are no such problems in a reality.

  • @nocodenoblunder6672
    @nocodenoblunder6672 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Why did you build warp with rust?

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      In short, we chose Rust because of its speed and also its strong developer community (for example, using crates.io for package management was a breeze and our entire team onboarded very quickly with tools like Rustlings).
      More importantly, Rust has a pretty extensive platform support--allowing us to write in a single language and then build for Mac, Linux, Windows, and ultimately the web by compiling to WASM.
      If you want to read more about how Warp was built, check our our blog here:
      www.warp.dev/blog/how-warp-works

  • @myronkipa2530
    @myronkipa2530 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    5:28 What safety issues are you talking about?

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

      Good question! We talk about some of the safety concerns of using interior mutability in our blog here:
      www.warp.dev/blog/why-is-building-a-ui-in-rust-so-hard

  • @RAJA-di5qj
    @RAJA-di5qj 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Thanks teacherðŸ‡ŪðŸ‡ģ

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      No problem!

  • @NoNamePerson18
    @NoNamePerson18 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    After rust I am fighting significantly less with my gf, now I fight with borrow checker

  • @filko3578
    @filko3578 12 āļ§āļąāļ™āļ—āļĩāđˆāļœāđˆāļēāļ™āļĄāļē

    We could also build the UI with Raylib. Doesn't mean we should

  • @Shaunmcdonogh-shaunsurfing
    @Shaunmcdonogh-shaunsurfing 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    Great video.

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Thanks!

  • @SaberRiryi
    @SaberRiryi 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    What I got from this video, is that if you try to do things the way you did them in React, you'll have a bad time. If you do them the way Rust wants you to, you'll have a good time.

  • @taylorworthington9394
    @taylorworthington9394 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    It hearkens to a reductive existential contradiction of rust's very safety. Does it mean that one of these methods simply has to "admit" and "embrace" the inevitable? It seems important to choose tools that embrace the inevitable - if it's the inevitable.

  • @timschannel247
    @timschannel247 26 āļ§āļąāļ™āļ—āļĩāđˆāļœāđˆāļēāļ™āļĄāļē

    Tauri isnt to bad for Devs, coming from JS background. I have focus to Tauri with Svelte, as it seems to me quite all in one thing to me. If you do perhaps know like QT for C++. I bet, Rust does have something similar. However, I would not blame Rust for being not good for UI, as it probably offers to many confusing ways to do stuff, if you think in a monolith. Even your MVC approach is unsure to me, as it might lead to blowing up the code.

  • @gunnarbernstein9363
    @gunnarbernstein9363 26 āļ§āļąāļ™āļ—āļĩāđˆāļœāđˆāļēāļ™āļĄāļē

    The video is much better than the catchy title suggest

  • @dr4ghs
    @dr4ghs 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    ECS outside of gamedev. Is this a dream?

  • @SalmanKhanCodingboy
    @SalmanKhanCodingboy 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    The command line is a tool that is ripe for change.

  • @donwinston
    @donwinston 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    We're evaluating Rust as a possibility in modernizing a huge CLI system written in C and TCL. (It is very very old). So far I've found it to be unfamiliar and difficult. It is not really OO and not really functional. It has no garbage collection. It has very high interest among developers for some reason and is the reason we are considering it because we could more easily attract top software engineers. (Our team is entirely made up of 60ish year olds)

  • @nukularius
    @nukularius 3 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Egui while complex internally is incredibly simple to use and it's pure rust as far as i know.

    • @alarie0
      @alarie0 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      its runs off wgpu or opengl c++ wrappers i think but it is quite well developed

  • @Holobrine
    @Holobrine 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    The lack of class hierarchy doesn’t mean you can’t organize components in a tree structure, huh? You could easily define a trait with componentDidMount() and similar functions, even a children() function that returns an impl Iterator

  • @AshishSinghh
    @AshishSinghh 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    So rust is basically golang without garbage collector?

  • @myronkipa2530
    @myronkipa2530 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Why'd you use it for UI?

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      In short, we chose Rust because of its speed and also its strong developer community (for example, using crates.io for package management was a breeze and our entire team onboarded very quickly with tools like Rustlings).
      More importantly, Rust has a pretty extensive platform support--allowing us to write in a single language and then build for Mac, Linux, Windows, and ultimately the web by compiling to WASM.
      If you want to read more about how Warp was built, check our our blog here:
      www.warp.dev/blog/how-warp-works

  • @DeviantFox
    @DeviantFox 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    This video was fantastic in content but visually a little bothersome. Making text hard to read (script vs plain) and then animating it (pulse) and not leaving it on screen long enough really took away from what you were trying to say imo.

  • @js-ny2ru
    @js-ny2ru 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

    The title of this video is misleading. Also React is not a language.

  • @saysthetedd
    @saysthetedd 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    We need more sandwiches in modern UI tbh

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      We agree!

  • @mattcurrington4499
    @mattcurrington4499 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Does this mean you and the warp team regret using Rust to build your app?

  • @abiodunoyetomi2802
    @abiodunoyetomi2802 2 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Why don’t you guys open source your GUI

  • @swedishpsychopath8795
    @swedishpsychopath8795 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    It is almost as the person in this video doesn't know object oriented programming. It also looks like it doesn't understand how to handle memory allocation.

  • @christianm4906
    @christianm4906 7 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I've been attempting to find compelling reasons to learn Rust, but it seems to be a challenging programming language in many practical aspects. It will likely be another unsuccessful effort to replace C and C++.

  • @chudchadanstud
    @chudchadanstud 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    The biggest issue is no inheritance. This is what happens when you adopt a fad.
    "Inheritance is bad because it is okay!"

  • @EbonySeraphim
    @EbonySeraphim 5 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    I don't think some of the characterizations stated here are true about Rust, and even the implications about programming in general are a little skewed. Rust not being "OOP" is quite far from accurate as it is about as OOP as C++ and Java meaningfully are -- which is to say that programmers who know true OOP know that even C++ and Java don't even qualify. Needing to use another paradigm that isn't "in vogue" with current frameworks shouldn't be considered a bad thing for a software engineer, it is just a different way of modeling the problem. ELM architecture pretty much seems like MVC to me, but I'm far from a real UI dev. ECS is absolutely an approach software engineers should know if they are writing applications where performance matters -- and hint: performance pretty much always matters. The only question is 1) if your company is wise enough to look at CPU/memory costs for servers and know you're leaving a ton of it on the table, or 2) if you have competing (client) software and customers will see how much slower and memory demanding your application runs versus another.
    ECS is very well used in game development as the way "OOP" has made a lot of engineers think about managing data (and indirectly memory) is actually very terribly inefficient when you have multiple subsystems working with the same "object" in your OOP mind, but in reality, the game's subsystems only need to see what they want to see. What I mean is, your game logic has an understand of an entity in the world in terms of gameplay logic and collision detection; the graphics rendering system only cares about the graphics data associated with the object; the sound system only cares about the sound data associated with the object; maybe the netcode doesn't give a crap about the object etc etc. Rather than have a single object "manage" all of it's own stuff as if should maintain all of those references, it's existence is actually defined through those subsystems understanding the association of an identity to the subsystem encapsulated (managed) data. In otherwords, the "Sonic" sprite doesn't reference the fact that it is drawn with "sonic.png," it exists with global ID 112233, and references texture ID 55667 which the graphics resource manager knows was loaded from file "sonic.png" and if you opened in an image editor, you would see the Sonic sprite. It's a classic newbie approach to think that a gameobject "subclass" needs to exist for Sonic, and somewhere in that source code, you'll read the fact that it uses texture "sonic.png." You can make a small game with that approach, but at some level of scale, you'll quickly run into a class explosion and realize how much you're repeating yourself. ECS is also beneficial because it's SoA rather than AoS -- that is, structure of arrays rather than array of structures. When your graphics system needs to rip through 10k objects out of 100k global objects and render those that are visibly relevant, better that it actually runs through an array of 10k relevant objects, than 100k objects through "polymorphism" and 90k objects just have a do nothing render()/draw() method. That's 90k bounces around in memory and your CPU cache is just constantly being trashed.
    The real reason Rust isn't a great langauge today for web GUIs is because it simply isn't mature yet. Javascript pretty much exists soley for the purpose of web UI dev and has been for decades and Rust is just arriving. Rust may not even the best use case for front end stuff, but as a general programming language people would like to prove it so projects don't have so much language + tooling mixing requiring too much knowledge spread for a dev team. Plus it has other benefits, that may pay off in the long run if the up front isn't too high.

  • @AdamFiregate
    @AdamFiregate 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Ok. Now Let's Get Rusty. 😊

  • @ardwetha
    @ardwetha 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    If I can't build my GUI, I will use a TUI.

  • @mwezi10
    @mwezi10 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    cool video

    • @warpdotdev
      @warpdotdev  11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

      Thanks!

  • @SianaGearz
    @SianaGearz 4 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    sudo make me a sammich UI object

  • @HyperFocusMarshmallow
    @HyperFocusMarshmallow 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    While rust isn’t OOP at least according to some criteria in some definitions, it is at least OP. 😜

  • @lovrodvorski7180
    @lovrodvorski7180 11 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    i think you shouldn't swap to camera if you're reading a script, just looks like you have lazy eye, but you're really interesting to listen to otherwise

  • @yongkangchia1993
    @yongkangchia1993 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +3

    ðŸŽŊ Key Takeaways for quick navigation:
    00:31 🧐 Building a graphical user interface (GUI) in Rust is challenging due to Rust's unique features like ownership and mutability rules.
    03:44 🔄 Rust's lack of object-oriented programming makes it difficult to create a top-level component that controls a GUI tree, unlike languages like React.
    06:51 🧠 One solution for Rust GUI development is adopting the ELM architecture, which consists of model, view, and update, or using an entity component system (ECS) architecture.
    08:20 🌐 In Warp, they implement an ECS-style approach with a system that owns components and maps their relationships, providing a way to create a GUI tree without relying on inheritance.
    Made with HARPA AI

  • @dmitrykim3096
    @dmitrykim3096 8 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +2

    AI will replace decelopers anyway

  • @abacaabaca8131
    @abacaabaca8131 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    This is actually the opposite of my expectation about Rust.
    The reason why I want to change from kotlin to rust, because I want to use pointer but in a safe way.
    Pointer to a structure or class is better than inheritance..
    Why do you think placing a pointer to the event loop is inefficient?

  • @GintsPolis
    @GintsPolis 10 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™

    Subject is so confusing.

  • @JohnSmith-gu9gl
    @JohnSmith-gu9gl 6 āļŦāļĨāļēāļĒāđ€āļ”āļ·āļ­āļ™āļāđˆāļ­āļ™ +1

    ohh great open source project!
    wait a second...and I am out