Building a Rust App With Yew!

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024

Комментарии • 141

  • @letsgetrusty
    @letsgetrusty  2 года назад +10

    📝Get your *FREE Rust cheat sheet* :
    www.letsgetrusty.com/cheatsheet

  • @Anto-mi5pn
    @Anto-mi5pn 2 года назад +149

    Please do more project based videos. I couldn't for the life of me understand why there aren't a lot of rust projects on RUclips.

    • @Karpfly
      @Karpfly 2 года назад +10

      Yes! Please do some projects! Some series with 10-15 min per video on where you describe how it works. API with DB and Frontend, desktop app(gtk, qt bindings), simple game(godot bindings) or embedded :)

    • @whoopassmemes7256
      @whoopassmemes7256 2 года назад +9

      I think it's because rust environment is pretty young. A lot of libraries has not 1.0, and despite the most love language since 2016, but i think a lot of them are professional who has a lot of experience and not really relying on tutorial. They just read the docs

    • @Karpfly
      @Karpfly 2 года назад +5

      @@whoopassmemes7256 yea, but this channel it's about learning Rust, I prefer learning with projects, on my university we have programming class with two kind of teachers, the "book" type where you write few simple cli program every class, and "project" type(those guys are owners of small dev company) - they only said: "i want you split in groups and write me app that does this, this and this, i don't care what technology you use, im your customer, sell me the app that i want. If you have problem with project im here to help you", so basically our groups have written and deployed multiple projects: desktop app(both linux and windows), web app and android app - that learned me much more than creating simple cli programs

    • @whoopassmemes7256
      @whoopassmemes7256 2 года назад +4

      @@Karpfly yes, i agree with you. But that's not my point. My point is, the language is young and has pretty little community who are also content creators compared to other languages like javascript, golang, etc. But i love watching rust related videos, even though I'm not really learning the language, because here in Indonesia rust is not popular at all, and I'm currently in uni, still beginer, and currently learning golang. So maybe someday i will learn it

    • @Karpfly
      @Karpfly 2 года назад +1

      @@whoopassmemes7256 yea, you are right, same is for me i like rust but i only saw one job post in Poland where rust was only mentioned as nice to know, maybe some day...

  • @thomascastelly5440
    @thomascastelly5440 2 года назад +74

    For desktop applications, Tauri + Yew it's a pretty cool setup 100% Rust!

    • @fus3n
      @fus3n 2 года назад +3

      do you know any (rust) beginner friendly GUI crates

    • @lbertondev9149
      @lbertondev9149 2 года назад +1

      Tauri is amazing desktop and mobile applications!!

    • @thomascastelly5440
      @thomascastelly5440 2 года назад +2

      @@lbertondev9149 Is mobile already available? I saw "in progress" and "coming soon".
      A cool setup to try for mobile is Flutter in FFI with Rust :)

    • @thomascastelly5440
      @thomascastelly5440 2 года назад +2

      @@fus3n You should take a look to Dioxus

    • @lbertondev9149
      @lbertondev9149 2 года назад

      ​@@thomascastelly5440 Yes, that's right, but soon mobile development will be available!

  • @musdevfrog
    @musdevfrog 2 года назад +38

    The framework looks really nice to be honest. I might even consider building my projects without javascript. Rust is the future.

  • @genericuser9138
    @genericuser9138 2 года назад +13

    Some medium or beginner level project based tutorials would be better.
    Most tutorials and videos on newer techs are just how to make counter.
    Moreover, a project with backend and frontend would be much appreciated.
    Thank you!

  • @haystackdmilith
    @haystackdmilith 2 года назад +3

    Using Yew since version 0.13. It's a lovely framework :) Nice you mentioned it

    • @ebrelus7687
      @ebrelus7687 Год назад

      Cześć. Tworzenie apek na androida już dodali? Czy w rust da się coś pisać funkcjonalnie są do tego biblioteki jak lodash i Ramda w js? Ten kanał tu chyba jest solidny na start. Sorki jestem zielony, dopiero ogarnialem reacta.

  • @thecombativemedic521
    @thecombativemedic521 2 года назад +2

    This is awesome I love practical and repeatable applications your an awesome teacher and made all of this feel so easy to learn!

  • @pedrobmorales
    @pedrobmorales Год назад

    Phenomenal, lots of excellent material!!! Will look into building UIs with Rust and Yew!

  • @jaysistar2711
    @jaysistar2711 2 года назад +2

    Perseus and Sycamore are my current choice. Server Side Rendering (SSR) and client side rendering Single Page App (SPA) in 1 package, like Next.js, or Sveltekit.

    • @ebrelus7687
      @ebrelus7687 Год назад

      can you share something simple like this on github to look? or a link to such

  • @agivney
    @agivney Год назад

    As always, a great tutorial, so easy to follow. Keep up the good work.

  • @lukecastellan3000
    @lukecastellan3000 2 года назад +7

    Although I'm a Ziglang guy, it's super cool to see what is possible with Rust and WebAssembly!

  • @MathiasLuer
    @MathiasLuer 3 месяца назад

    I really love that. I have a question how do Yew apps perform in the matter of search engines

  • @brianteague8031
    @brianteague8031 2 года назад +1

    sauron is also worth checking out and also supports SSR.

  • @UndeadSasuke34
    @UndeadSasuke34 Год назад

    I am a web dev, and I started learning rust for fun, and I love it. Do you think companies in the not too far future will start building apps with rust for backend and/or frontend? I will be so down to get a job for a company like this

  • @RiwenX
    @RiwenX 2 года назад +5

    I was considering Yew for a new project, but the ecosystem is still lacking. For example, there is no map library yet.

  • @MikeM8891
    @MikeM8891 2 года назад +1

    For me the wasm file this produced was over a 1 MB! I guess I need to consider the size of my project before using Yew. I would love to see what Yew is really capable of. It just seems really heavy for such a small app, one that would be very easy and light to implement in Javascript with just notepad.

  • @MisererePart
    @MisererePart 2 года назад +1

    I think you should take a look at Dioxus, which seems to be a more evolved framework than Yew for styling.

  • @codetothemoon
    @codetothemoon 2 года назад +2

    Fantastic video! I am a bit of a Yew fan :)

  • @chairmakerPete
    @chairmakerPete Год назад

    Wow - this is really neat!
    Rust looks a bit tricky to learn, but could well be worth the effort.

  • @haystackdmilith
    @haystackdmilith 2 года назад

    Cargo extension worth mention: `cargo install cargo-edit` will install `cargo add` feature. With this you can simply write `cargo add yew` in the project root and it will automatically pick the latest version available.

    • @gregoryking2664
      @gregoryking2664 2 года назад +2

      In Rust 1.62 this comes built in.

    • @nsa3967
      @nsa3967 Год назад

      This is built in now

  • @crazyaccess
    @crazyaccess 2 года назад +1

    Let’s rust, new intro loving you and your channel…

  • @payman5581
    @payman5581 2 года назад +1

    Nice job. Can we use tailwind or bootstrap with yew?

  • @coldsir5406
    @coldsir5406 2 года назад +7

    Awesome content. Love it. If Rust was be a girl I would marry her.

  • @yashsaxena9
    @yashsaxena9 2 года назад +1

    Hello, I'm new to rust and webassembly. Can you specify what are the gains of yew over existing frameworks? I thought webassembly gets an api level access to dom so actually modifying dom elements is slower than a js way of dom manipulation, so wouldn't it take a huge toll when using web assembly for that?? Also does yew use multithreading? Also I can't find newer content on webassembly and yew, most of the things I get over internet is 2 to 4 years old, please suggest some newer content of you know any. Thank you :)

    • @someghosts
      @someghosts 2 года назад

      Commenting here so I get alerted if anyone replies

  • @alexkuiper1096
    @alexkuiper1096 Год назад

    Brilliant - thanks!

  • @PieroRolando
    @PieroRolando 2 года назад +2

    They now support functional components and hooks!

  • @Thegamer-kf8zz
    @Thegamer-kf8zz Год назад

    Awesome video! This helped so much!!!!!

  • @valentinomelis8331
    @valentinomelis8331 2 года назад

    More video with yew!
    Even Using Tokio or Tauri please

  • @altairbueno5637
    @altairbueno5637 2 года назад +1

    The struct based components may be deprecated in the future in favor of function components tho

  • @----__---
    @----__--- 2 года назад +5

    Afaik the general consensus afaik that wasm will not be an ideal solution fot building frontends until it can do direct dom manipulation.

    • @SumoCumLoudly
      @SumoCumLoudly 2 года назад

      Web assembly won't take off because its still too slow, not close to native performance. So apps that are too heavy for the Web are still too heavy, and javascript is already fine for everything else.

    • @----__---
      @----__--- 2 года назад +3

      @@SumoCumLoudly Web assembly is not slow. Its literally the fastest you can get on the web. Once the major browsers start enabling wasm to have access to the browser APIs and the DOM, the javascript FFI will not be a bottleneck and wasm become able to really take off.

    • @climatechangedoesntbargain9140
      @climatechangedoesntbargain9140 2 года назад

      I think long term everything will be wasm, including js

    • @raidensama1511
      @raidensama1511 Год назад

      As said back in the early 2000s JavaScript needs to die

  • @ok5938
    @ok5938 Год назад

    Hey man thanks for these amazing videos. Could you do more tutorials on yew wasm, like after testing it locally, how could we host it online for the internet to access? Currently im trying to host a static web page done using yew, and I tried to host it on github page, but it did not seem to work. github pages only able to load my index.html which is an empty page.

  • @tetuaoro
    @tetuaoro 2 года назад

    Thanks a lot. Sure more video about yewww.

  • @jeffg4686
    @jeffg4686 2 года назад

    I INVENTED "impl vars" !!! It's one for the books ! (and I'm not even the smart one, not by a long shot - but I invented impl vars). Jeff was here 🤪

  • @bobgodwinx
    @bobgodwinx 2 года назад

    The Best! Thanks

  • @andrefilipefonsecaborba4989
    @andrefilipefonsecaborba4989 2 года назад

    please, more rust videos!!!

  • @kennethbeal
    @kennethbeal Год назад

    Thank you!

  • @TheZdannar
    @TheZdannar 2 года назад

    I would like to see some videos taking Yew farther. Otherwise, I always enjoy your content.

  • @guymercier627
    @guymercier627 Год назад

    Great programming and nice application... but still there is a long way before it can be compared or replace the Django library... looking forward to Rust.... I would like some example of replacing my React frontend with Rust. Currently I use React in some frontend applications and Django-Python RestFramework API backend...

  • @simppugaming2546
    @simppugaming2546 2 года назад

    I followed the amazing tutorial but how would I go about deploying the website?

  • @askmeshiah
    @askmeshiah 2 года назад

    Thanks so much. Keep up the good work.

  • @leftyhero147
    @leftyhero147 2 года назад

    Wtf man, you just read my mind. I was looking for something with Yew and Wasm

  • @andriyabu
    @andriyabu 2 года назад

    awesome man.

  • @mandjcraft
    @mandjcraft 2 года назад +2

    I wish you did this with function components instead.

  • @__lyynn
    @__lyynn 2 года назад

    Hey, what kind of UI software can we build with Rust ?
    This type of application can be easier un JavaScript with Électron and NodeJS.
    ( I have discover the Rust yesterday and i love it 😂 cli applications would be fun to build )

    • @lucianochadru4064
      @lucianochadru4064 2 года назад

      ruclips.net/user/creativcodervideos

    • @lucianochadru4064
      @lucianochadru4064 2 года назад

      Don't be scared, this is actually easier that what you may think at the beginning. Just... fake it 'til you make it !

  • @batman4895
    @batman4895 2 года назад

    I would love to see more wasm(_bindgen) tutorials as well as macro tutorials in the future!
    How did you actually achieve that the terminal is showing your history commands?

    • @aduentix9491
      @aduentix9491 2 года назад +1

      It's probably not zsh (the shell) (which is standard on MacOS), but "fish". You can look up tutorial on how to get a nice fish shell :)

    • @batman4895
      @batman4895 2 года назад

      @@aduentix9491 thank you!

  • @adsick_ua
    @adsick_ua 2 года назад

    suggest increasing video bitrate for better quality

  • @sbx1720
    @sbx1720 2 года назад +1

    nice, but I prefer dioxus because you can build for web, mobile and desktop

    • @ironhammer4095
      @ironhammer4095 2 года назад +2

      Wow, thanks for this comment. I did not know Dioxus existed. Now I do.

  • @alexandersemionov5790
    @alexandersemionov5790 2 года назад

    What’s the size of resulting wasm and JS?

  • @maalunandhu007
    @maalunandhu007 Год назад

    thank you

  • @saaddahmani1870
    @saaddahmani1870 2 года назад

    Please, a video about desktop GUI frameworks in Rust.

  • @s1n7ax
    @s1n7ax 2 года назад

    Please create more videos. Global state and other important stuff

  • @avaric3z
    @avaric3z 2 года назад

    Can you make a video with ICED?

  • @mtteslian9159
    @mtteslian9159 2 года назад

    Great class !

  • @dziurappa
    @dziurappa 2 года назад

    Yes, I want more!

  • @wintersunset1773
    @wintersunset1773 Год назад

    SIX HOURS OF PAIN
    Gone a couple minutes
    Thanks a bunch

  • @funnynews341
    @funnynews341 2 года назад

    the basic videos is so much as docs show. But we can't find a complete projects rust production like other language (python, js, react,..)

  • @GlobalYoung7
    @GlobalYoung7 2 года назад

    Thank you 🙏 😊

  • @jaldaadithya5053
    @jaldaadithya5053 2 года назад

    could you please make a video on actix web with yew

  • @betrueto1
    @betrueto1 Год назад

    Noticed your later videos were on a Macbook, and earlier Ubuntu. Also, we all know Microsoft is a big Rust advocate.
    I want to create a VM for Rust dev with *all* the goodies to standardize the development environment. Can you recommend an OS? DO I give up any goodies with Linux (clippy, analyzer, etc.)? If not, is there a distro with a small footprint and required dev libraries that someone could recommend to build up such a VM? Thanks in advance. :-)

  • @marcmarugan3565
    @marcmarugan3565 Год назад

    Your code does not work anymore. "error from HTML pipeline" when running trunk serve

  • @pancakeslayer9084
    @pancakeslayer9084 2 года назад

    How can I change default 8080 port?

  • @jonathanmoore5619
    @jonathanmoore5619 2 года назад

    Thks

  • @sajjad7818
    @sajjad7818 Год назад

    Awesome

  • @MarkusBurrer
    @MarkusBurrer 2 года назад +1

    I like Rust, but in this case I really would prefer Elm

  • @xodix1416
    @xodix1416 2 года назад +1

    Could you look into Tauri? Setup is quite easy but calling rust from the frontend is something I will never understand

    • @ikazuchi-san5772
      @ikazuchi-san5772 2 года назад +2

      Tauri*
      its for making desktop applications out of web applications, just like electron

    • @xodix1416
      @xodix1416 2 года назад +1

      @@ikazuchi-san5772 Ducking auto correct.

    • @ikazuchi-san5772
      @ikazuchi-san5772 2 года назад +1

      @@xodix1416 oh i see, ye autocorrect is horrible sometimes

  • @antonpodkur3520
    @antonpodkur3520 2 года назад

    More project videos!

  • @klutch4198
    @klutch4198 2 года назад

    Nice!

  • @typecek
    @typecek 2 года назад

    how do I center a div

  • @learntry9074
    @learntry9074 2 года назад

    perfect ..

  • @bitconnect
    @bitconnect 2 года назад

    i liked the video

  • @Fidelity_Investments
    @Fidelity_Investments 2 года назад

    I think I have a crush on this man.

  • @tomascerny6567
    @tomascerny6567 2 года назад +1

    The font size is so large it hurts my eyes.

  • @lucianochadru4064
    @lucianochadru4064 2 года назад

    Reason why use Yew instead of wasm-pack ?

  • @voqlyafvxj5658
    @voqlyafvxj5658 2 года назад +4

    You people need to understand this guy dont want to do more stuff like that. And people in a lot of these type of channels too. This guy takes code from yew repository, simplify this and record the video. If you google "yew counter" you'll find the example project from official yew repo.
    Thank you for your attention.

  • @alexzander__6334
    @alexzander__6334 2 года назад

    wow, at last you started to put github repo of what you are doing in the video

  • @13ciaran13000
    @13ciaran13000 Год назад

    Sorry to be a noob here, but for the love of god can someone please explain to me what the hell "rustup" is. Everywhere I go seems to just assume I have it, and when I go to install it it says I need to uninstall rust??????? Like I assume it has its own version of rustc or whatever but idk. Someone please explain.

    • @13ciaran13000
      @13ciaran13000 Год назад

      Like is there no way to target WASM with like normal Rust???? Like I have to install this weird alternative version of Rust?

    • @bartoszdobija2069
      @bartoszdobija2069 Год назад

      @@13ciaran13000 it's not alternative version of rust, this is more like rust installer, it can update your rust, add packages like yew or rust-analyzer etc

  • @sileme3733
    @sileme3733 2 года назад

    If it weren't for you, I don't know what to do, I don't want to spend money on it

  • @stefankyriacou7151
    @stefankyriacou7151 2 года назад

    More project based videos would be awesome!

  • @krtirtho
    @krtirtho 2 года назад

    Seriously, the creators of Yew didn't find any better name than this? -_-

  • @willinton06
    @willinton06 2 года назад

    A bit of boilerplate ngl but pretty good nonetheless

  • @gusvanwes6192
    @gusvanwes6192 5 месяцев назад

    I can't follow this as I don't know react

  • @zhaadd
    @zhaadd 2 года назад +1

    this is my first time crying over coding

  • @andregraes
    @andregraes 2 года назад

    A COUNTER?? Really?? A counter?!

  • @tigrux
    @tigrux 2 года назад

    That sound of a mechanical keyboard… hmmmm….

  • @Scipio-Nigerianus
    @Scipio-Nigerianus 2 года назад +1

    Nice although it's counterintuitive to build a website with Rust. Way too complicated for something as simple as a counter. Svelte does this in like 5 lines

    • @mosth8ed
      @mosth8ed 2 года назад

      Yeah, but Rust, though..

    • @RiwenX
      @RiwenX 2 года назад +5

      Obviously, a true production app in Yew wouldn't be a simple counter...

  • @HylianEvil
    @HylianEvil 2 года назад

    do what now to the like button?

  • @wajahatalibasharat6923
    @wajahatalibasharat6923 2 года назад

    rember life is short, so spend it wisely

  • @nam1780
    @nam1780 2 года назад

    I AM BROKE SO I CANT AFFORD IT MY PARENTS WILL NEVER ALLOW (TT)

  • @MrZiyak99
    @MrZiyak99 2 года назад

    Rust is clearly not meant to ever be used for web apps but this is cool nonetheless

  • @electrocuted5010
    @electrocuted5010 2 года назад

    But why would you build a web app in Rust, when the ecosystem is undeveloped and JS/TS is mature? I really don't see an incentive to compile to WASM for the world's fastest cookie clicker app.

  • @veritopian1823
    @veritopian1823 Год назад

    This vid would be much better if you had the code prepared so you could concentrate on explaining it.
    Your explanation isn't very good because you're thinking only at the code level, with no wider view.
    Watching people type is like watching paint dry...

  • @santiago4773
    @santiago4773 2 года назад

    Always the same st*pid counter app 🤦😪

  • @THEGAMER-cc2eq
    @THEGAMER-cc2eq 2 года назад +1

    How's the situation in Ukraine?

  • @evangeloskolimitras5276
    @evangeloskolimitras5276 2 года назад +1

    Oh man please don't make the channel shity. Don't do the mistake other youtubers do. I come from a multiple years of web dev background and I know the library/framework/what so ever shiet. Actix, tokio etc yeah i think they offer something but in general my opinion is to keep your channel as vanilla as you can. Teach rust. Not rust frameworks. Just a suggestion. Keep up the nice work.

  • @rapelangmathibe8761
    @rapelangmathibe8761 2 года назад

    can you do a video on your vs code setup

  • @Hyperboid
    @Hyperboid 2 года назад

    Nix users: Use this command to serve:
    nix-shell -p trunk --run "trunk serve"

  • @tomkcey
    @tomkcey 2 года назад +2

    websockets :) we want websockets
    message broker :) we want message broker
    postgres :) we want postgres
    :)

  • @commievoyager
    @commievoyager Год назад

    Exellent! That all works! Just one point that _ctx should be private for me. But it still works.