Building a Rust App With Yew!

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 140

  • @letsgetrusty
    @letsgetrusty  2 роки тому +11

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

  • @Anto-mi5pn
    @Anto-mi5pn 2 роки тому +151

    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 UA-cam.

    • @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 роки тому +77

    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 роки тому +39

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

  • @haystackdmilith
    @haystackdmilith 2 роки тому +4

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

    • @ebrelus7687
      @ebrelus7687 2 роки тому

      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 роки тому +3

    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 Рік тому +1

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

  • @genericuser9138
    @genericuser9138 2 роки тому +14

    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!

  • @agivney
    @agivney Рік тому +1

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

  • @brianteague8031
    @brianteague8031 2 роки тому +2

    sauron is also worth checking out and also supports SSR.

  • @chairmakerPete
    @chairmakerPete Рік тому +1

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

  • @codetothemoon
    @codetothemoon 2 роки тому +3

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

  • @haystackdmilith
    @haystackdmilith 2 роки тому +1

    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.

  • @crazyaccess
    @crazyaccess 2 роки тому +2

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

  • @jaysistar2711
    @jaysistar2711 2 роки тому +3

    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 2 роки тому

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

  • @RiwenX
    @RiwenX 2 роки тому +6

    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.

    • @izacximenes
      @izacximenes 2 роки тому +1

      use trunk build --release

  • @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.

  • @MathiasLuer
    @MathiasLuer 6 місяців тому

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

  • @altairbueno5637
    @altairbueno5637 2 роки тому +1

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

  • @lukecastellan3000
    @lukecastellan3000 2 роки тому +8

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

  • @UndeadSasuke34
    @UndeadSasuke34 2 роки тому

    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

  • @----__---
    @----__--- 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

  • @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

  • @Thegamer-kf8zz
    @Thegamer-kf8zz 2 роки тому

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

  • @payman5581
    @payman5581 2 роки тому +1

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

  • @PieroRolando
    @PieroRolando 2 роки тому +2

    They now support functional components and hooks!

  • @mandjcraft
    @mandjcraft 2 роки тому +2

    I wish you did this with function components instead.

  • @askmeshiah
    @askmeshiah 2 роки тому

    Thanks so much. Keep up the good work.

  • @simppugaming2546
    @simppugaming2546 2 роки тому

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

  • @siminaniwhat
    @siminaniwhat Рік тому

    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.

  • @alexandersemionov5790
    @alexandersemionov5790 2 роки тому

    What’s the size of resulting wasm and JS?

  • @coldsir5406
    @coldsir5406 2 роки тому +7

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

  • @tetuaoro
    @tetuaoro 2 роки тому

    Thanks a lot. Sure more video about yewww.

  • @pancakeslayer9084
    @pancakeslayer9084 2 роки тому

    How can I change default 8080 port?

  • @jaldaadithya5053
    @jaldaadithya5053 2 роки тому

    could you please make a video on actix web with yew

  • @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...

  • @typecek
    @typecek 2 роки тому

    how do I center a div

  • @valentinomelis8331
    @valentinomelis8331 2 роки тому

    More video with yew!
    Even Using Tokio or Tauri please

  • @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,..)

  • @avaric3z
    @avaric3z 2 роки тому

    Can you make a video with ICED?

  • @__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 роки тому

      ua-cam.com/users/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 !

  • @alexkuiper1096
    @alexkuiper1096 2 роки тому

    Brilliant - thanks!

  • @mtteslian9159
    @mtteslian9159 2 роки тому

    Great class !

  • @saaddahmani1870
    @saaddahmani1870 2 роки тому

    Please, a video about desktop GUI frameworks in Rust.

  • @andrefilipefonsecaborba4989
    @andrefilipefonsecaborba4989 2 роки тому

    please, more rust videos!!!

  • @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.

  • @TheZdannar
    @TheZdannar 2 роки тому

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

  • @bobgodwinx
    @bobgodwinx 2 роки тому

    The Best! Thanks

  • @leftyhero147
    @leftyhero147 2 роки тому

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

  • @adsick_ua
    @adsick_ua 2 роки тому

    suggest increasing video bitrate for better quality

  • @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!

  • @s1n7ax
    @s1n7ax 2 роки тому

    Please create more videos. Global state and other important stuff

  • @GlobalYoung7
    @GlobalYoung7 2 роки тому

    Thank you 🙏 😊

  • @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 🤪

  • @lucianochadru4064
    @lucianochadru4064 2 роки тому

    Reason why use Yew instead of wasm-pack ?

  • @tomascerny6567
    @tomascerny6567 2 роки тому +1

    The font size is so large it hurts my eyes.

  • @kennethbeal
    @kennethbeal 2 роки тому

    Thank you!

  • @andriyabu
    @andriyabu 2 роки тому

    awesome man.

  • @dziurappa
    @dziurappa 2 роки тому

    Yes, I want more!

  • @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

  • @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

  • @MarkusBurrer
    @MarkusBurrer 2 роки тому +1

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

  • @gusvanwes6192
    @gusvanwes6192 8 місяців тому

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

  • @betrueto1
    @betrueto1 2 роки тому

    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. :-)

  • @alexzander__6334
    @alexzander__6334 2 роки тому

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

  • @wintersunset1773
    @wintersunset1773 2 роки тому

    SIX HOURS OF PAIN
    Gone a couple minutes
    Thanks a bunch

  • @antonpodkur3520
    @antonpodkur3520 2 роки тому

    More project videos!

  • @Fidelity_Investments
    @Fidelity_Investments 2 роки тому

    I think I have a crush on this man.

  • @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!

  • @maalunandhu007
    @maalunandhu007 2 роки тому

    thank you

  • @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.

  • @jonathanmoore5619
    @jonathanmoore5619 2 роки тому

    Thks

  • @willinton06
    @willinton06 2 роки тому

    A bit of boilerplate ngl but pretty good nonetheless

  • @krtirtho
    @krtirtho 2 роки тому

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

  • @zhaadd
    @zhaadd 2 роки тому +1

    this is my first time crying over coding

  • @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...

  • @klutch4198
    @klutch4198 2 роки тому

    Nice!

  • @tigrux
    @tigrux 2 роки тому

    That sound of a mechanical keyboard… hmmmm….

  • @andregraes
    @andregraes 2 роки тому

    A COUNTER?? Really?? A counter?!

  • @bitconnect
    @bitconnect 2 роки тому

    i liked the video

  • @sajjad7818
    @sajjad7818 2 роки тому

    Awesome

  • @HylianEvil
    @HylianEvil 2 роки тому

    do what now to the like button?

  • @learntry9074
    @learntry9074 2 роки тому

    perfect ..

  • @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)

  • @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.

  • @MrZiyak99
    @MrZiyak99 2 роки тому

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

  • @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 🤦😪

  • @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.

  • @THEGAMER-cc2eq
    @THEGAMER-cc2eq 2 роки тому +1

    How's the situation in Ukraine?

  • @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 2 роки тому

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