Rust & Wasm

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น • 548

  • @NoBoilerplate
    @NoBoilerplate  2 ปีที่แล้ว +603

    ERRATA
    I was not clear that wasm is only slower than JS in DOM manipulation. If you write pure wasm and webgl, you can smoke JS.

    • @w1keee
      @w1keee 2 ปีที่แล้ว +28

      small syntax error: at 5:55 some of the component trait's methods don't have semicolons after

    • @finnmonstar
      @finnmonstar 2 ปีที่แล้ว +2

      @@w1keee Those may have default implementations that are not included in the video.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +28

      @@w1keee Thank you! That's part of the code that is omitted on the slide, it's not valid rust (super compressed code to try to fit it on one slide).

    • @raffimolero64
      @raffimolero64 2 ปีที่แล้ว +1

      ​@@w1keee more specifically, they are trait methods with default implementations and are thus followed by code blocks rather than semicolons

    • @w1keee
      @w1keee 2 ปีที่แล้ว

      @@raffimolero64 ok, thanks

  • @yondaime500
    @yondaime500 2 ปีที่แล้ว +715

    You certainly have a way of making Rust sound like it came to us as a gift from a Kardashev II civilization.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +124

      I'm not saying Rust will make us immune to extinction....!

    • @willemidaho
      @willemidaho ปีที่แล้ว +42

      @@NoBoilerplate yet.

    • @crowlsyong
      @crowlsyong ปีที่แล้ว +3

      Lol nice comment

    • @gunnaryoung
      @gunnaryoung ปีที่แล้ว

      @@NoBoilerplate "it's a cookbook!"

    • @qosujinn5345
      @qosujinn5345 11 หลายเดือนก่อน +1

      W kardashev mention lessgoh

  • @tylerbloom4830
    @tylerbloom4830 2 ปีที่แล้ว +62

    In my current personal project, I'm writing a backend and several clients all in Rust, including a frontend using Yew. There is one boon that WASM gives you that you didn't touch on. You can directly share libraries between your backend and frontend. No reimplementation. No bugs from translating between languages. You can ensure that the behavior of your data structures is identical between every piece of the project. Fix a bug once, and you're done!!
    The message passing pattern showcased is also a fantastic way to handle client-server communication and syncing of shared state.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +23

      Brilliant! I'll make sure to mention this in the follow-up video, in a month!

    • @svelterust
      @svelterust ปีที่แล้ว +7

      Yeah this is really the biggest benefit of using one language for both backend and frontend 😄

    • @aeonsleo2
      @aeonsleo2 4 หลายเดือนก่อน

      I believe the web was designed in a flawed manner (client server). It should have been one right from the beginning or it should be reimagined by browsers of today.

    • @DavidLindes
      @DavidLindes 25 วันที่ผ่านมา

      @@aeonsleo2 certainly not everything that's currently done using the client-server model has much need to be done that way (with caveats I'll elide here), but... for some things, it strikes me as inherently necessary. Like, do you have suggestions on how one might write, say, an e-commerce site that doesn't use a client-server model in some manner? If so, how?

  • @drasleek6170
    @drasleek6170 2 ปีที่แล้ว +86

    There's something about your videos that makes me so interested in programming in rust. Keep up the good work!

    • @Speykious
      @Speykious 2 ปีที่แล้ว +13

      -It's the british accent B)-

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +2

      hehe!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +2

      Thank you! Honestly I feel the same, so it must be the Rust XD

  • @mikopiko
    @mikopiko 2 ปีที่แล้ว +51

    Man, your content is so minimal, pure & easy to understand.
    I am addicted to your channel even though I don't write Rust.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +9

      You don't yet write Rust ;-)
      The Book is where I started, keep watching!
      doc.rust-lang.org/stable/book/

    • @mikopiko
      @mikopiko 2 ปีที่แล้ว +7

      @@NoBoilerplate I've had my eyes on Rust for a couple of years but haven't found any reason to try it yet, still waiting for that day to happen. (I am a Rails dev so I mostly develop within the web)
      BUT there is an ongoing rewrite of Ruby called Artichoke, in … of course Rust.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +7

      @@mikopiko Ha! The whole world is oxidising! rocket.rs is the closest to Rails that I've seen, though it's more like Sinatra with strong community plugin support. Rails is wild isn't it! We use it at work here and there!

  • @eboatwright_
    @eboatwright_ 2 ปีที่แล้ว +89

    I completely agree! I use the game framework Macroquad for little games that I make, and it has support for WASM! No lag, no hassle, just "cargo build --release --target=wasm32-unknown-unknown"!

    • @tentaklaus9382
      @tentaklaus9382 2 ปีที่แล้ว +5

      I'm learning Rust by building a 2D roguelike game based off a book by Herbert Wolverson called Hands-on Rust. 👍

    • @thecoweggs
      @thecoweggs 2 ปีที่แล้ว

      its you again

    • @eboatwright_
      @eboatwright_ 2 ปีที่แล้ว +1

      @@tentaklaus9382 Awesome!

    • @eboatwright_
      @eboatwright_ 2 ปีที่แล้ว

      @@thecoweggs hello

    • @jumbledfox2098
      @jumbledfox2098 7 หลายเดือนก่อน

      macroquad is so amazing! i recently made a minesweeper game and putting it on my website was literally so easy

  • @mathgeniuszach
    @mathgeniuszach 2 ปีที่แล้ว +330

    The rust ecosystem never ceases to amaze. I can see that in just years from now, rust will be able to do quite literally everything. A _new_ javascript if you will

    • @Ahheck01
      @Ahheck01 2 ปีที่แล้ว +11

      I will.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +68

      It's faster than React today - it's ready!

    • @redcrafterlppa303
      @redcrafterlppa303 2 ปีที่แล้ว +19

      @@NoBoilerplate it's also faster as compiled binaries. I ported a program I designed as a lightweight background program in c# to rust and the memory usage was cut in 7 and cpu usage went from 0.1 % to unmeasurable. Thanks to rusts high level feel it wasn't as painful as c/c++ even though I needed to use the raw windows window functions.

    • @Metagross31
      @Metagross31 2 ปีที่แล้ว +10

      @mathgeniuszach with the difference of Rust not being as horrible as Javascript :D

    • @myronkipa2530
      @myronkipa2530 2 ปีที่แล้ว +6

      @@NoBoilerplate You said js is faster than wasm. Is it really?

  • @Yaxqb
    @Yaxqb 2 ปีที่แล้ว +134

    PSA: Remember that rendering to a canvas breaks the accessibility of the page. Screen readers won't read elements aloud, being able to copy-paste text gets lost, no auto reflow is possible with CSS, etc. 🙏👍

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +44

      Agreed, I really love web accessibility (It's a huge thing where I work), but it's good to have the option to write webgl applications and games!

    • @unmellowthegamer8946
      @unmellowthegamer8946 2 ปีที่แล้ว +4

      It would be nice if you could just tell the browser the access ability attributes of a screen region.

    • @mikejamesbelanger
      @mikejamesbelanger 2 ปีที่แล้ว +3

      Lack of accessibility is currently a drawback, although my feeling is long-term screen-readers are going to be replaced by AI chatbots anyways. Copy-paste is an interesting problem, although there must be a way to hold text in a state that the cursor could then grab, depending on the framework used.

    • @cerulity32k
      @cerulity32k ปีที่แล้ว

      That is true, but it's also true for JS/Flash (afaik). I'm learning WASM to make web games, because I feel that they will have more reach.

    • @AdamWoodAMW
      @AdamWoodAMW ปีที่แล้ว +4

      > my feeling is long-term screen-readers are going to be replaced by AI chatbots anyway
      I'm guessing you don't use a screen reader or have any close friends who need them

  • @nici9376
    @nici9376 2 ปีที่แล้ว +4

    I bloody love your sponsors. Thats how you everyone should do them. They always have something to do with the video.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      This is what's it's all about!

  • @Zedoy
    @Zedoy 2 ปีที่แล้ว +324

    Me: Manipulates DOM directly with JS.
    No_Boilerplate: No one manipulates DOM directly.
    Me: 😐.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +113

      Oh you should try jQuery /s :-D

    • @mathgeniuszach
      @mathgeniuszach 2 ปีที่แล้ว +10

      I mean... rust _can_ still manipulate the DOM directly sooo

    • @allesarfint
      @allesarfint 2 ปีที่แล้ว +70

      Imagine wasting your time writing clean and performant code to interact with the DOM instead of using a heavy and cumbersome -framework- library like React.

    • @airman122469
      @airman122469 2 ปีที่แล้ว +4

      I’ve done this. But I was in an environment where I literally was barred from using react or angular.

    • @vincentweber1359
      @vincentweber1359 2 ปีที่แล้ว +7

      ​@@NoBoilerplate I'm currently trying to get permission from my Tech Lead to rip jQuery out of our project... xD

  • @AndrewBrownK
    @AndrewBrownK 2 ปีที่แล้ว +15

    I’m finally getting to the point I grok the lifetime errors the compiler is complaining about at a glance, and can instantly think where I messed up and where I need to go fix. It used to be that algebraic data types were my gold standard to consider a modern language usable or not, but now I can’t imagine programming without a borrow checker.
    Literally, Ive been working on this personal project (a distributed event framework) for months with type level programming, and at roughly 3500 lines of code before a minimum executable demo, it executed not just successfully but correctly too. Literally first try. I was in shock. I was fully expecting to debug for hours or days. I’m in love with this language.

  • @soixantelly
    @soixantelly 2 ปีที่แล้ว +26

    the procedural macros are the most genius and mind blowing feature to ever exist in a programming language, rust basically solved the source generators problem in the most elegant way and went a step beyond

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +12

      This is literally why I'm here. They've existed in lisp for longer than most of us have been alive, but it's AWESOME that rust took the best parts of lisp!

  • @Kfoo-dj4md
    @Kfoo-dj4md 2 ปีที่แล้ว +49

    Tris makes me feel like I know everything CS related just by knowing rust 😂
    Rust is my favorite language 🦀

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +14

      HONESTLY this is how I feel. I'm learning so much about how stuff ACTUALLY works, by learning Rust!
      Tried to explain it in this one th-cam.com/video/0rJ94rbdteE/w-d-xo.html

    • @Kfoo-dj4md
      @Kfoo-dj4md 2 ปีที่แล้ว +1

      @@NoBoilerplate I totally agree! 🦀

  • @joelmontesdeoca6572
    @joelmontesdeoca6572 2 ปีที่แล้ว +3

    Every time I watch your videos I fall in love with Rust all over again.

  • @remiwi2399
    @remiwi2399 2 ปีที่แล้ว +51

    I'm learning React right now so I can get a job. If only I could use rust for this! Will definitely look into it more if I ever make my own personal projects.

    • @tqwewe
      @tqwewe 2 ปีที่แล้ว +3

      hopefully in the coming years Rust frontend will be much more mainstream 🤞

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +28

      React will be a great framework to get work! It's never a bad idea to learn more languages and techniques :-D

    • @b0nes95
      @b0nes95 2 ปีที่แล้ว +4

      unfortunate that most companies hire React devs when Vue 3 is so much more dev friendly and maintainable and readable.

    • @zuma206
      @zuma206 2 ปีที่แล้ว

      Brilliant philosophy. Im learning react + nextjs for my career, with remix as my personal choice. That way personal projects will be efficient but I'm still hirable

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      @@zuma206 More knowledge is always good!

  • @ronwabwire
    @ronwabwire 2 ปีที่แล้ว +10

    Rust is so blazingly fast, I downloaded and installed it 5 times thinking something was wrong, literally micro seconds installation of the compiler. It was only after running rustc that I found out that the compiler installed already!

  • @Ma1ne2
    @Ma1ne2 2 ปีที่แล้ว +13

    Quadratic looks awesome, was just today hearing from a friend that has to fight Excel and VB at work, where he is locked into Microsoft products. This looks like such a cool, modern alternative! I love the idea of bringing python and it's whole ecosystem into the mix.

  • @varsketisLT
    @varsketisLT 2 ปีที่แล้ว +15

    You present Rust in such a way that I feel like I want to learn it so much... It's just that I JUST got my first programming job a couple of weeks ago and I also have a couple of Java and JS projects still unfinished, and a freelance gig with Python. Yet the less time I have, the more drawn to Rust i become lol

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +12

      Congratulations! Welcome to a really great industry :-D
      Don't worry about it, you'll learn 10 new languages (if you've got the right attitude) during your career. 5 of which haven't been invented yet!
      Rust's a great one to learn for now.

    • @varsketisLT
      @varsketisLT 2 ปีที่แล้ว +2

      ​@@NoBoilerplate Thank you for the reply.
      I was planning to build a multiplayer Android/ios, very simple card game in Java. I am now thinking of doing it in Rust. Would it be too hard, in your opinion? Or should I start somewhere else?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +4

      @@varsketisLT I think you'll have a much more INTERESTING life if you write it in Rust! The game engine we like around these parts is bevyengine.org
      Come chat to us in #newbie-advice on my discord server, links on noboilerplate.org!

    • @varsketisLT
      @varsketisLT 2 ปีที่แล้ว +2

      @@NoBoilerplate Thank you so much, will do!

  • @electra_
    @electra_ 2 ปีที่แล้ว +1

    Thank you for this video! I started working with Rust Wasm today and got a basic webserver and website running that changes what's displayed based on the web parameters. Very happy with how it turned out - especially that no JS was required.

  • @lembu7220
    @lembu7220 2 ปีที่แล้ว +1

    I’m obsessed with your channel. I watch all your videos on the day of release. Please keep it up!

  • @tempest_dawn
    @tempest_dawn 2 ปีที่แล้ว +4

    i'm excited to try yew out - i've been doing React for work for years, and i've done a bit of by-hand rust-wasm here and there, plus a fair bit of rust+react. this feels like the next logical step in basically every way

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Terrific! Yes I'm excited by Yew now!

  • @999mrgreen
    @999mrgreen 2 ปีที่แล้ว +1

    Your videos inspired me to learn Rust and I'm so glad I did! I've already converted several of my personal projects.
    Whenever someone asks me for info about Rust I always point them to your videos.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Fantastic! I'm on a mission to show the world how great this language is!

  • @extremrams
    @extremrams 2 ปีที่แล้ว +3

    Great video as always :)
    I love yew. As always, don't underestimate the learning curve (as with everything rust) - you need to spend some time with the current webassembly stack in rust to really get going. Once you have that, you pick up speed and that's the point where it gets really great.
    For example we had to process a big excel file and send some parts to the server.. well, guess what: Just use an excel reader crate - process everything client side and send a payload of a few kb instead of 20mb. You can even have shared types in your front and backend and send the payloads back and fourth in the perfect format - apply some validators there and you have input validation everywhere!
    Just some input to underline the things you can have for free :)

  • @marcovitale8808
    @marcovitale8808 2 ปีที่แล้ว +1

    Fantastic video, as always! I'd also like to congratulate you on your choice of sponsors. This is the first time I've seen sponsorships in videos that really interest me and that I'm going to look into, keep it up!

  • @PromptStreamer
    @PromptStreamer 2 ปีที่แล้ว +5

    Really nice video, clear and fast-moving

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +2

      Thank you very much, I have 9 other Rust videos in the same fast format, I'd love to know what you think!

  • @Hobbitstomper
    @Hobbitstomper 2 ปีที่แล้ว +12

    The biggest downside is still that Wasm can't interact with the DOM of a website directly and relies on JavaScript. Even if you write everything in Rust to interact with the DOM, Wasm translates it into JS, which then interacts with the DOM. This eventually results in a bottleneck. The guys over at Wasm are saying they're working on a way around this. I'm sure once they have a solution, browsers will need to add support for that. Once this is solved, that's when things will get interesting. Imagine websites running on Rust/Wasm with direct access to the DOM api without the need for JavaScript.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Are you certain of this fact? Yew is faster than react in dom manipulation benchmarks.

    • @zomakaja
      @zomakaja 2 ปีที่แล้ว +11

      @@NoBoilerplate Yes. React is not a particularly fast framework. Svelte, Vue, and Preact are all faster than Yew according to the js framework benchmark. Using WASM for DOM manipulation can't be as fast as vanilla js, as of rn.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +5

      @@zomakaja Right, that makes sense. Seems like wasm dom manipulation is fast enough though, if it's faster than react - how many websites are powered by react!

  • @somedooby
    @somedooby 2 ปีที่แล้ว +4

    At 0:25 you mentioned that AWS supports Rust. That is sort of true, but not quite. Everywhere that the AWS Rust SDK is mentioned, they state that the SDK is a preview and that it should not be used in production. Rusoto is the alternative

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Sure, and gmail was beta for two decades ;-)
      Rusoto is in maintenance mode, since the aws sdk dropped, it's great!

  • @job4753
    @job4753 2 ปีที่แล้ว +3

    I had so much hope for this being a video about perseus. Even though perseus is still in very early development, it absolutely crushes nextjs with SSR *and* SSG support. It also is a backend and frontend in one framework.
    Their own website looks super good and only after like 2 seconds you are like "wow did it just instantly load"?
    I highly recommend checking it out, even if it is just for fun and giggles.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +3

      Wow, I just checked it out! That is SUPER impressive. I'll watch Perseus with great interest, thank you!

    • @job4753
      @job4753 2 ปีที่แล้ว +1

      @@NoBoilerplate You are welcome:) Happy to share.
      Ever considered making a podcast or short video every month / 2 weeks, about new things in the rust ecosystem. Bit like the code report from Fireship but for Rust.
      There is a lot of new stuff happening in the Rust ecosystem and I think a lot of Rusteans would love to to get to know the new stuff, but sometimes are overwhelmed with all new things. Especially deciding if it is quality or garbage with a cool name.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +2

      @@job4753 Great idea! But I think I'll leave that to the professionals. My videos are featured in the various weekly roundup posts, newsletters and threads round about.
      I prefer to produce high impact, high value videos. I saw there was a lack of highly-produced introductory content in the Rust community (Though Fireship is an exception), and I want to make sure as many people get excited about this world-changing language as possible.
      Once they're listening/reading the weekly roundups, the work is done, and the language sells itself 🙂

    • @job4753
      @job4753 2 ปีที่แล้ว

      @@NoBoilerplate fully understand that:))

  • @mattjohnson2975
    @mattjohnson2975 11 หลายเดือนก่อน +1

    1:10 True, but why should javascript even be ported to wasm when it runs directly on browsers anyway?

  • @markquinn1146
    @markquinn1146 2 ปีที่แล้ว +11

    Looks interesting. How would the styling side of things work? I guess it would be an external stylesheet with classNames though.
    Also if it had a way to hot reload the way most front end frameworks/libraries do it could be a winner!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +10

      Yew hot reloads without a page load. I nearly fell of my chair when it did it first!

  • @bananaboye3759
    @bananaboye3759 ปีที่แล้ว +1

    At 7:39, are you inserting rust code right into the button's onclick attribute? I thought you could only put JS in there.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว +1

      amazing, right? Yew is generating some js plumbing code for you! Try the yew.rs tutorial!

  • @awwastor
    @awwastor 2 ปีที่แล้ว +8

    I think Swift and Nim would be really nice languages for WASM too, for people who don’t want to/have issues with learning the borrow checker. Both of them are getting closer and closer to making their GC/RC less often used. Swift is a lovely language, it kind of sucks it’s so heavily intertwined with the apple ecosystem.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +3

      I also wish that, but we must play the hand we are dealt!
      Rust isn't my favourite language because it's perfect, it's my favourite language because it's practical and we can build a team and get good work done NOW!

    • @morkallearns781
      @morkallearns781 ปีที่แล้ว

      Doesn’t Swift now have a borrow checker?

    • @awwastor
      @awwastor ปีที่แล้ว

      @@morkallearns781 Not yet I don’t think? inout arguments block you from passing both an immutable and mutable “reference” to a value, but no ownership (yet)

  • @paguman_ahoy8887
    @paguman_ahoy8887 2 ปีที่แล้ว +1

    Currently learning rust as a hobby. This gets me more excited for what I can do with it😄

  • @llcoolchris_
    @llcoolchris_ 2 ปีที่แล้ว +5

    The thing with Yew that really bothers me, is that the styling is still painful. Well, was painful, idk if today we have solid solutions. But once we’re getting something solid like CSS Modules or Styled components, I’m JUMPING in it!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +3

      Take your pick and jump in! crates.io/crates/yew-style-in-rs

  • @snydicus
    @snydicus ปีที่แล้ว +3

    The best part about this series is that once each video is finished, a new JS framework is released queuing up content for the next video

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว +1

      Ugh, you're not even exaggerating that much XD

  • @guinetik
    @guinetik 2 ปีที่แล้ว +1

    YES! Finally the video I was waiting for from you :)

  • @ahuman32478
    @ahuman32478 ปีที่แล้ว +1

    You mentioned that we don't usually manipulate the DOM directly using Rust or JS? Why not? I recently made a web application to display content from a site, and I used DOM manipulation to add labels with extra data. I did what you showed at 2:43 where I created elements to append to another element, which I then appended to the page.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      I don't think I said that - I mean that most of your application logic is plumbing, not UI code.
      JS can access the DOM directly, through the window.document api. WASM applications have to call js to then call window.document, so there's a layer of indirection.

  • @ar4ys
    @ar4ys 2 ปีที่แล้ว +13

    Now, just imagine: Yew + Tauri. The perfect duo for cross platform desktop apps with the flexibility of WEB technologies and power/safety of Rust.
    Damn I want that now... Somebody knows Web-Rust Tauri bindgen tools? That's literally the last piece in the puzzle for seamless Rust-only desktop development.

    • @ArgoIo
      @ArgoIo 2 ปีที่แล้ว +3

      I don't know, whether this fits what you are looking for, but the Tauri documentation does state, that one can build a Yew project with Tauri.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +3

      the dream!

    • @TheNewJavaman
      @TheNewJavaman 2 ปีที่แล้ว +6

      Tauri has the `create-tauri-app` cli tool, which includes a template for Yew 🙂

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +3

      @@TheNewJavaman omg yesssss

  • @miguelguthridge
    @miguelguthridge 2 ปีที่แล้ว +5

    I've been learning Rust for a couple of weeks now and although it hasn't been without it's headaches, those headaches have always been because of additional complexity that other languages keep hidden.
    A great example I ran into a couple of hours ago was when I tried to convert a char into uppercase. I was expecting to get a character out the other end, but I ended up with a completely different type which I couldn't convert.
    It turns out that converting certain characters to uppercase can result in more than one character being produced - an edge case that I never would have considered had I been writing in any other language.
    Over the years, there have been many crashes on operating systems like Android and iOS due to them missing edge cases of Unicode such as the one above. I can't help but wonder how many of them could have been avoided if the operating systems were programmed using Rust's spectacular error checking.

    • @MaakaSakuranbo
      @MaakaSakuranbo 2 ปีที่แล้ว +2

      Hah, thats a cool. My main issue in getting into Rust tends to be to find good up-to-date tutorials. I only find very simple tutorials. And then keep getting stuck trying to write my own stuff.
      But trying to find an answer to my issues tends to find tons of outdated answers because Rust changed so much over time

    • @miguelguthridge
      @miguelguthridge 2 ปีที่แล้ว +1

      @@MaakaSakuranbo yeah I'm really lucky in that I'm taking a university course on it so there's a whole team of dedicated teachers making the process as smooth running as possible.

    • @peter9477
      @peter9477 2 ปีที่แล้ว +1

      @@miguelguthridge If you were asking about the uppercase char thing on Stackoverflow, I just saw your question. And if that wasn't you, a practically identical question is there.... fun and eye-opening discussion in comments and answers.

    • @miguelguthridge
      @miguelguthridge 2 ปีที่แล้ว +2

      @@peter9477 it wasn't me, but I'm pretty sure I encountered a similar question while figuring out what was wrong.

  • @peruibeloko
    @peruibeloko 2 ปีที่แล้ว +2

    The way you handle state and mutations on Yew feels almost identical to the Elm Architecture, and I'm all in for it

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Huge fan of elm - it's all functional programming sensible defaults!

    • @Tsudico
      @Tsudico 2 ปีที่แล้ว +2

      I think Yew was heavily influenced by Elm, which is why they chose Yew for a name.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      @@Tsudico omg

  • @alandto3996
    @alandto3996 2 ปีที่แล้ว +2

    Thank you for the content, and I can tell it's going to be great even before I watch it.

  • @adamd0ggg2
    @adamd0ggg2 2 ปีที่แล้ว +2

    The biggest issue with react is implementation details bleeding into the abstraction. having to constantly duplicate objects with {...something, prop:"new value"} to set a new state because things are immutable being a key example. When you have an account balance and do +10 no one envisions that a brand new account is created with a value 10 more. The yew way of updates reminds me of a required useReducer hook as the only way to update.

  • @stef9019
    @stef9019 2 ปีที่แล้ว +1

    This gets me excited to code some more Rust 😍! Great video, subbed

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      I'm excited for you! It's very hard, you'll have to watch more of my videos to get excited, but start with the book doc.rust-lang.org/stable/book/

  • @jeffg4686
    @jeffg4686 2 ปีที่แล้ว +22

    @1:51 - I'd say that graph/chart alone sells Rust - want to do WA, likely gonna want rust.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +4

      Right! check the sourcecode for the links for more info

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f 2 ปีที่แล้ว

      smh, imagine not deciding on using the boilerplate driven language designed for writing verbose, object oriented, instant legacy code

  • @AceofSpades5757
    @AceofSpades5757 2 ปีที่แล้ว +1

    Yew is a fantastic library. I've used if for multiple projects and thoroughly enjoy it.

  • @olaniyanayodele5986
    @olaniyanayodele5986 ปีที่แล้ว +1

    Special request: Can you do a video on rust use cases (what you can do with rust) and also what you should actually use it for and not use it for. Cause I hear people say "Rust shouldn't be used for web dev (backend ofc) "
    Love the channel btw thank you

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      Thank you so much! I think you can and should use Rust for anything! My video on this is here th-cam.com/video/4dvf6kM70qM/w-d-xo.html

  • @Crux161
    @Crux161 2 ปีที่แล้ว +1

    These videos and the level of content they maintain (more importantly) absolutely wonderful 🎉 Every time I think “how’s he going to make this interesting?” And yet you absolutely floor me. Please, just teach a class or something already. 🤦‍♂️ 💕

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Thank you so much - maybe I will!

  • @sharperguy
    @sharperguy ปีที่แล้ว +7

    It seems like the only thing holding back Rust right now is time. Time for people to realize its potential, time for people to get used to the slightly different paradigms that it uses, and time for the ecosystem to develop and the language to stabilize a little.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว +5

      Absolutely. I am trying to push the needle slightly in the right direction with my Rust series!

  • @DavidLindes
    @DavidLindes 25 วันที่ผ่านมา

    Ooh, I'd heard of Yew, but now I want to play with it... thanks for turning my attention in that direction.
    Minor complaint: it would have been nice to show how to get this to actually load up. I've got that working for a simpler wasm thing, and I'm sure I'll figure it out, just... something to consider for future videos.

  • @_modiX
    @_modiX 2 ปีที่แล้ว +1

    You do an excellent job in selling this technology, and I'm sold.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Thank you, but it's the tech that sells itself, honestly! The reason I'm over here making these videos is that I NEED more people to know that a pleasant programming life is possible :-)
      Have you tried much Rust yet? Make sure you've watched this intro video of mine th-cam.com/video/CJtvnepMVAU/w-d-xo.html

    • @_modiX
      @_modiX 2 ปีที่แล้ว +1

      @@NoBoilerplate Thank you for sharing. Rust is on my scope for a while now. As of now I have to maintain a lot of hybrid web/apps (native), so things like ReactNative with Expo and Flutter. I'm already keen to try Dioxus, despite Rust still treating mobile as 2nd Tier target. I soon have to make a good decision and I couldn't thank you more for bringing this on my radar, once again.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      @@_modiX I hear good things about Dioxus - do try out yew.rs and tauri.app too!

  • @minerscale
    @minerscale 2 ปีที่แล้ว +3

    I don't understand, you said that wasm is slower than JavaScript, in what way is this true? Wasm is much faster for many applications isn't it. Where is it slower? Interfacing with the DOM?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Yes, that's it - JS is still faster at DOM manipulation - FOR NOW!

    • @minerscale
      @minerscale 2 ปีที่แล้ว +1

      @@NoBoilerplate I don't understand why wasm can't (and people think it shouldn't) directly interface with the DOM. To me it makes perfect sense that we make JavaScript optional.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      @@minerscale I couldn't agree more. Removing Javascript from web programming is an important step to allow the industry to heal from the damage XD
      Yew.rs is faster than react, and people say react is fast enough.

    • @minerscale
      @minerscale 2 ปีที่แล้ว +1

      @@NoBoilerplate I like that the pendulum is finally swinging back to developing software 'the right way' with the proliferation of rust and wasm slowly making its way on the scene. Throwing away orders of magnitude of performance so your app can actually be a browser still seems popular though hahahaha.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      @@minerscale I'm very excited about this trend too - we're getting back into taking things seriously in software!
      Yes, it's not as fast yet as it could be, certainly for DOM manipulation, but it's fast enough - and every browser release gets huge optimisations for wasm, so it's fast enough today, and very fast tomorrow!

  • @mannycalavera121
    @mannycalavera121 2 ปีที่แล้ว +2

    Rust aside, you're videos are therapeutic

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Thank you! You might find my gentle scifi podcast even MORE so! I'd love to know what you think th-cam.com/video/p3bDE9kszMc/w-d-xo.html

  • @aeonsleo2
    @aeonsleo2 4 หลายเดือนก่อน

    This is a blessing. I am fed up with npm dependency issues and runtime errors which should have been handled in compile time had there been a compiler in PHP or Python

  • @tim_arterbury
    @tim_arterbury 10 หลายเดือนก่อน

    Wow this is amazing 😍
    Thank you for sharing!!

  • @i_am_feenster
    @i_am_feenster 2 ปีที่แล้ว +2

    Hi, thanks for another video! Where did you get the statistic that Rust the cheapest language for lambda functions? Seems like a powerful argument to use in a classic "ehh guys, maybe we should start using Rust?" company discussion :)

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +2

      Lambda is charged on run time and memory usage. Rust is as fast as C, and with a tiny runtime overhead. THEREFORE: Cheap on lambda!
      My next video, writing now, actually goes in to detail.
      I dread talking about it, because I'll have to talk about benchmarks - always an area of contention!

    • @i_am_feenster
      @i_am_feenster 2 ปีที่แล้ว

      ​@@NoBoilerplate Awesome, looking forward to it! Yeah, I can imagine, folks in general can be quite 'particular' in language discussions :)

  • @scion911
    @scion911 2 ปีที่แล้ว +3

    Not related to wasm in general but tauri + rust is a great tool to build things specifically if you want to create something which can work with system level features like running a custom-built ml model and pipeline but have a fast to prototype and great UI using web frameworks (although its slow but it gets the job done)

  • @ahuman32478
    @ahuman32478 2 ปีที่แล้ว +1

    0:28 Can you deploy Rust applications on Mac OS and Linux as well?

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      Yes, but you will have to build binaries for any platform you want. This can be automated, and most projects do so.
      There is first-class support across all common platforms, including OSX, Windows, and (my primary OS) Linux.
      The comprehensive page where you can see all compiler targets (including android and ARM!) is here doc.rust-lang.org/beta/rustc/platform-support.html

  • @BosonCollider
    @BosonCollider ปีที่แล้ว +1

    Dioxus is another option which is less verbose than yew and is faster than Svelte once loaded, which is a higher bar to beat than being faster than react.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      Yeah, I've become much more interested in Dioxus since making this video, very impressive!

  • @scheimong
    @scheimong 2 ปีที่แล้ว +2

    What does it mean anymore to be a "front-end", "back-end", or "full-stack" developer at this point?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Absolutely, very arbitrary tbh

  • @VECT4GAMING
    @VECT4GAMING 2 ปีที่แล้ว +2

    I’m trying to get into using rust for web developement, my expirience with web developement as a whole is limited to AWS, goHugo, and an understanding of html and css. Would you say that learning yew as a front end and Axum would be a smart step foreward?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Yew - absolutely!
      Backend, I'd try rocket.rs first. I love Poem, too.

  • @WikiPeoples
    @WikiPeoples 2 ปีที่แล้ว +1

    4:25 can you clarify this? I was not under the impression that JS is faster than WA ... Is this a fact?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      It's specifically in DOM manipulations that JS is faster, because in current implamentations WASM has to go *VIA* JS to touch the DOM. This is not the case with webgl or pure computation.

    • @WikiPeoples
      @WikiPeoples 2 ปีที่แล้ว

      @@NoBoilerplate Ah ok, that makes sense

  • @WizardofWestmarch
    @WizardofWestmarch 2 ปีที่แล้ว +2

    At the end where you are talking about where rust runs probably would be wise to mention for valid llvm targets. Until the gcc frontend is done there are still a lot of places rust won't run like a lot of embedded environments

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Oh really, I wasn't aware. There's a bunch of embedded targets it DOES run on though, right? What would gcc get us?

    • @WizardofWestmarch
      @WizardofWestmarch 2 ปีที่แล้ว +3

      @@NoBoilerplate There are some that LLVM runs on yeah, like I believe Pi's. Part of the whole "get Rust into the Rust Kernel" debate was because of the limits in what platforms LLVM allowed. But thanks to them agreeing to allow it for drivers (which clearly not every environment needs drivers) the lack of what targets LLVM allows doesn't matter so much.
      Now mind you some specialized hardware doesn't even get compiled to from GCC, in cases where the hardware vendor actually supplies their own compiler tool chain. That's an area where we may need to see the rust specification that is in the works come through before Rust can make inroads there.

  • @Speykious
    @Speykious 2 ปีที่แล้ว +2

    You always nail the sponsors.

  • @phenanrithe
    @phenanrithe 2 ปีที่แล้ว +1

    Looks great, thanks for sharing! A little disagreement though, macros offer poor visibility in general regarding errors at compilation, and average support in IDEs because it's complex for them to interpret (for ex. with refactorization and type inference).

  • @効-q1b
    @効-q1b 2 ปีที่แล้ว +1

    As a web developer with 8 years of experience, using react since the beginning, recently vue, I really really want this. But at the same time, I'm fairly confident that the industry won't be able to make the switch, not in the next 10 years at least.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      The revolution could start with you!

  • @spongechameleon6940
    @spongechameleon6940 2 ปีที่แล้ว +1

    Fyi I just looked up the sponsor, quadratic, and it seems like their product is written in typescript, not rust.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Yeah, they told me that the rewrite is Rust based, which is terrific!

    • @quadratichq
      @quadratichq 2 ปีที่แล้ว

      @@NoBoilerplate Exactly!

  • @KiranasOfRizon
    @KiranasOfRizon 2 ปีที่แล้ว +2

    No Boilerplate: The best Rust shill on youtube.

  • @sosignon
    @sosignon 2 ปีที่แล้ว +7

    I'd love it if Yew could render CSS in the same way it renders HTML!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +11

      BAM thanks for making me look this up, this is great!
      crates.io/crates/yew-style-in-rs

    • @sosignon
      @sosignon 2 ปีที่แล้ว +6

      @@NoBoilerplate Oh sweet Lord, it's scoped as well. I may have to ditch Vue.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      @@sosignon let me know how it goes! (are you on the discord?)

    • @sosignon
      @sosignon 2 ปีที่แล้ว

      @@NoBoilerplate Ha, I don't know when I'll next get a chance, but yes of course. Not in the Discord yet, will hop on.

  • @ivanschuetz9458
    @ivanschuetz9458 2 ปีที่แล้ว +1

    But what about the WASM binary size? I remember that there's an article on some wiki about how to reduce it (compiler optimizations etc), but it still adds quite a bit, for example an optimized WASM file for a web project I'm doing (without any clearly "special" dependencies) is ~2MB..

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Interesting problem. Are you compiling in release mode?

  • @noabstruction
    @noabstruction ปีที่แล้ว +1

    You know JS congratulation you are a backend developer. :). Just Keding great video bro. I am seriously considering Rust now.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      Ha! Yes good point, node is really great!
      Have you seen my other videos? Here's the playlist, get excited! th-cam.com/video/CJtvnepMVAU/w-d-xo.html

  • @ruvasqm
    @ruvasqm 2 ปีที่แล้ว +2

    When I watch your videos I feel like I'm being roped into a sect and it looks so good!

    • @TheAndrejP
      @TheAndrejP 2 ปีที่แล้ว +2

      The cargo cult! 😄

    • @ruvasqm
      @ruvasqm 2 ปีที่แล้ว +1

      @@TheAndrejP a very funny coincidence en.wikipedia.org/wiki/Cargo_cult
      I do know what you meant though hahaha!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      new channel name right there tbh

  • @alexzander__6334
    @alexzander__6334 2 ปีที่แล้ว +1

    please make more examples with multi-threading/async on WASM

  • @HoloTheDrunk
    @HoloTheDrunk 2 ปีที่แล้ว +1

    My current Rust project is the peak of Rust full-stack development:
    Compiler for the esolang? Rust with Pest for lexing/parsing and Inkwell for compilation to LLVM IR.
    Website frontend for the esolang? Rust with Yew.
    Website backend with public compilation API (also used by the frontend)? Rust with Actix and possibly Diesel.
    Hotel? Trivago.
    I absolutely love this language and its ecosystem

  • @DavidAlsh
    @DavidAlsh 7 หลายเดือนก่อน

    One thing I haven't gotten my head around yet with Rayon is blocking the underlying Rayon worker with a channel. With Tokio, async channels allow for the future to pause while the worker executes other tasks while Rayon uses std::sync::mpsc::channel which will block the entire thread if you .recv() on it.
    Can you use Tokio with wasm?

  • @weggespamt7816
    @weggespamt7816 2 ปีที่แล้ว +2

    Did you try Dioxus? It is like yew but closer to react ☺️

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Looks nice! Popularity is important, however:
      Yew has 10x the number of recent downloads on crates.io. I will follow Dioxus's progress with great interest, thank you!

  • @KingJellyfishII
    @KingJellyfishII ปีที่แล้ว +2

    I'd _really_ love to write an app using egui and have the same codebase for both web and native, but at least from my testing the performance isn't quite there yet. Also the accessibility issues. Definitely going to use yew in the future, though.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว +1

      Yes, I think that if I were in your position, I'd use Tauri and Yew. Much more mature, html is *the* interface!

  • @lucky-segfault
    @lucky-segfault 2 ปีที่แล้ว +1

    wake up babe new no boilerplate video just dropped

  • @joshaustintech
    @joshaustintech ปีที่แล้ว +1

    This and the Good Rust Web Stack video have inspired me to go full-stack Rust! I'm sure you have a lot on your plate, but I was curious if a Rust WebGL demo video is still in the works?

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      I didn't go too crazy with it, but I did put out part 2! th-cam.com/video/y10jJX35shE/w-d-xo.html
      And if you'd like my recommendations on how to learn rust further, here's my playlist:
      th-cam.com/video/2hXNd6x9sZs/w-d-xo.html

  • @noblenetdk
    @noblenetdk 2 ปีที่แล้ว +1

    I'm trying to use rust to write files. I have various problems with creating text and files. I would love a video explaining howto work with text (or strings) I find it quite cumbersome in rust. Do you have a video og strings and io?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      Come and chat to us on the Discord - ask your question in #newbie-advice!

  • @chris.dillon
    @chris.dillon 2 ปีที่แล้ว +1

    I want to believe.
    Can it be the first lang to transcend all abstraction layers? Will rocket truly bewebyet? Can Yew carve out enough share from React to make a small town to live in?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Rust is the #19th most popular language in the world :-D
      redmonk.com/sogrady/2022/03/28/language-rankings-1-22/

    • @TheAndrejP
      @TheAndrejP 2 ปีที่แล้ว +1

      @@NoBoilerplate wow, behind Objective-C! That's terrible!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      @@TheAndrejP Think of how many Objective-C projects are out there, for years the only language you could write ios apps in XD

  • @MaximilienNoal
    @MaximilienNoal 2 ปีที่แล้ว +1

    When targeting WASM, C# is compiled ahead of time. There is no JIT, no GC.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Thank you for the information.
      Have you seen what else Rust can do? I tried to cover many topics here: th-cam.com/video/0rJ94rbdteE/w-d-xo.html

  • @Jianju69
    @Jianju69 2 ปีที่แล้ว +1

    How about a video on using Yew for an app with both web and native targets?

  • @JorgetePanete
    @JorgetePanete 2 ปีที่แล้ว +1

    Now with the qwik framework and js to html5 compiling, is pure html faster than wasm?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Tell me more!

    • @JorgetePanete
      @JorgetePanete 2 ปีที่แล้ว

      @@NoBoilerplate Fireship has a video on it, it also loads the js lazily, maybe the next framework discovers how to optimally choose what to lazy-load

  • @tudbut
    @tudbut 2 ปีที่แล้ว +2

    Awh yeah, another fast, technical video!

  • @ashikurrahman2247
    @ashikurrahman2247 ปีที่แล้ว

    First of all, hi everyone.
    What is the library used at 2:26 that looks like vanilla js?

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว +1

      That's native Rust webassembly, exposed by wasm-bindgen, we never code using that plumbing, just as we never code javascript like the slide after demos. Try leptos.dev !

    • @ashikurrahman2247
      @ashikurrahman2247 ปีที่แล้ว +1

      @@NoBoilerplate thank you!

  • @AntonioNoack
    @AntonioNoack 2 ปีที่แล้ว +1

    Nice video, but the blue progress bar is kind of superfluous on TH-cam, where we already have a red progress bar.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      I put it there for people in fullscreen - on desktop or mobile, to see where along in the video it is - as the red progress bar disappears!

  • @thurston04
    @thurston04 2 ปีที่แล้ว +2

    So...can I compile my gtk-rs program to web assembly? :)

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      If the gtk library has been ported, yes! But you might find a pure rust UI library better to write in, as that can be compiled to wasm with no extra work. Take a look at EGUI!

  • @eduardabramovich1216
    @eduardabramovich1216 2 ปีที่แล้ว +1

    Quick question, is it possible to create Desktop Environment, like Gnome, KDE for linux, using WASM?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      in-browser? Very possibly! But you'd have a lot of work to do there!

  • @cna9708
    @cna9708 ปีที่แล้ว +1

    Your videos are are very interesting an motivating. I would like to learn by creating a desktop application. But most GUI frameworks I could find until now are either for Web, are in an experimental state or not native in rust. Do you have maybe a recommendation for a rust native cross-platform (windows/linux) desktop application GUI framework/crate. It does not have to be beginner friendly. I rather looking to learn real world fundamentals. Thanks for the inspiring videos.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว +1

      My pleasure! Yes, though there are GTK and QT bindings, I wouldn't go for them just yet.
      Try EGUI with eframe, or Tauri with Yew.rs.
      Do ask in #newbie-advice on my discord server, there's loads of nice people to help out!

  • @vivavoy
    @vivavoy หลายเดือนก่อน

    there was too much jargon on the webgl alledged issue, which i could not understand, can someone explain?

  • @hazreh
    @hazreh 2 ปีที่แล้ว +2

    I haven't looked into WASM in terms of Dom manipulation for a while but last time I checked it had to ship Javascript code to manipulate Dom which is basically made it a lot slower than vanilla Javascript.
    You mention React as a point of comparison but I can list you a sea of frameworks that are 10x and more times faster than react. Especially when things like Svelte And SolidJS exist.
    I still think WASM needs more work on the browser side before it can be used fully without depending on JS.
    Currently best use case for WASM is heavy duty apps and complex logic that needs to run in the browser that doesn't manipulate Dom elements.

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      I agree that wasm is terrific for number crunching, but I don't quite agree with your conclusion that we shouldn't use it for DOM manipulation.
      Most people don't care about benchmarks, only paying attention if things are too slow, and that doesn't happen for most people, right? How else do we explain React's popularity?

    • @hazreh
      @hazreh 2 ปีที่แล้ว +1

      @@NoBoilerplate I guess my point is that for current web developers, WASM is just a nice option when you might complex and performant logic. But it's definitely not a better alternative.
      As it stands I think WASM is better for people already familiar with more backend style languages like C++, Java, Go, Rust and etc, especially if they don't like the modern JS syntax and ecosystem.
      Basically as a JS dev, I don't see a reason to use WASM until I have a specific use case where something needs to happen on client side really fast for example video encoding, decoding, ML type of work and etc. Basically things not possible before WASM.
      I see WASM as a nice complementary addon to the Web that is ruled by JavaScript. But as it stands it's not a replacement nor was it designed to be one.
      Of course this doesn't stop people to do whatever they want even when there are compromises but performance and latency are very important things in web, especially when you tie it to SEO and page rankings.

    • @hazreh
      @hazreh 2 ปีที่แล้ว +2

      WASM for web aside, I find wasm usecase and especially WASi very interesting for embedded systems where you can code in whatever language you want using a specific interface and get a output that can basically run in any environment regardless of hardware, hardware architecture and etc.
      I definitely see a future where we just ship wasm binary packages to create a cross platform magic that could be used by any programing language.
      Example of this: th-cam.com/video/LMsDWEGYTHg/w-d-xo.html

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      @@hazreh Yes that's a very exciting idea - java for embedded, with low level control, maybe!

  • @batSerjo
    @batSerjo 2 ปีที่แล้ว +1

    Oh how do you deal with browser discrepancies in rust now!

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      They're better than they've ever been these days, certainly based on my normal html experience!

  • @Raykazen
    @Raykazen 2 ปีที่แล้ว +1

    Very cool video! Thank you for sharing

  • @avi7278
    @avi7278 ปีที่แล้ว +1

    I'm confused by the statement web assembly is slower than JavaScript but yew is faster than react.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      That's not quite right, sorry for the confusion:
      Pure Webassembly computation (math, say) is much faster than javascript.
      The bottleneck is accessing web apis from webassembly, which requires you to go via a javascript bridge. This bottleneck causes javascript to be faster than webassembly *at DOM manipulations*.
      However, this slowdown is often mitigated by wasm's pure speed.

    • @avi7278
      @avi7278 ปีที่แล้ว

      @@NoBoilerplate ok thank you for the clarification. I was also wondering if you actually had a video showing how or a repo with the code for the terminal emulator you created for Lost Terminal (an ingenious bit of podcast, btw)

  • @mikehunt3205
    @mikehunt3205 2 ปีที่แล้ว +1

    Am I going to need NoRust and NoGo to complement NoScript?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      I think probably nowasm would do it all! Maybe noscript already does this?

  • @KasperDahlTangen
    @KasperDahlTangen 2 ปีที่แล้ว +1

    Can it be directly converted to native apps? Like in Maui for C# Blazor

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว +1

      There are GUI libraries that target both native AND wasm, my favourite is EGUI - build win/mac/linux binaries, or wasm!

  • @magpinybo7524
    @magpinybo7524 ปีที่แล้ว +1

    Where can I host my rust(yew) websites? Cpanel has only javascript(nodejs), python and php.

    • @NoBoilerplate
      @NoBoilerplate  ปีที่แล้ว

      Heroku's still a great option, though lacking the old free dev tier. You could try a sponsor of mine, Shuttle.rs, they specialise in hosting rust, and I liked them before being paid by them! XD

  • @eyemotif
    @eyemotif 2 ปีที่แล้ว +1

    amazing video as always 🧡

  • @RoamingAdhocrat
    @RoamingAdhocrat 3 หลายเดือนก่อน

    I realise things have probably moved on but at 1:30 you show a table of what languages support(ed in 2022) Wasm and mention Python is absent, then show a graph of Wasm use than includes Python..?

  • @PandaNuker
    @PandaNuker 2 ปีที่แล้ว +1

    Lambdas don't have native support for Rust yet though, do they?

    • @NoBoilerplate
      @NoBoilerplate  2 ปีที่แล้ว

      Sure do, for years! Ever since the binary-only lambdas. You can run what you like, as long as it's a single musl binary!