Why You Should Learn Svelte and Rust

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

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

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

    Want to BUILD real web apps? Join the SvelteRust community today: svelterust.com

  • @67fabs
    @67fabs ปีที่แล้ว +18

    Do you plan to make a tutorial like an app using Rust as backend and Svelte as front ? Would be nice to have this case covered :)

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

      Yes, there will be multiple tutorials like this in the future😄

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

      @@svelterust interesting and subbbs

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

      Would it be called SUStack ඞ

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

      @@SharunKumar Heh, probably not SUStack x)

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

      Checkout the latest todo app example for this :)

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

    I suddenly stumbled upon your channel and thought, wow, a channel about the two things I love the most: svelte and rust. Great combo.

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

      Awesome! There will be lots of content covering Svelte and Rust in the future😄 What's your experience with those two?

  • @712Jefferson
    @712Jefferson 7 หลายเดือนก่อน +1

    Absolutely delighted to discover your channel. Have Svelte experience in the past but new to Rust and wanting to create a simple desktop app with Tauri using Svelte for the frontend coding. Should be an interesting learning experience... thank you for the resources!

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

      Thanks for the kind comments! I've been way to busy lately but appreciate this a lot 😄 If you're stuck on any parts, feel free to send me a mail to svelterust@svelterust.com

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

    Hey, im from react switching over to svelte. i dont know rust or go but when looking at rust vs go why do you prefer rust? go seems easier to learn and get things up quicker from some other videos ive seen. would love to hear your take.

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

      Go is also a great programming language, and it is true that Go is easier to learn and get things up quicker than Rust. But there are some key differences between them, such as:
      - Rust is blazingly fast, same speed and sometimes faster than C. Go is also fast, but is approximately 3x slower than Rust from benchmarks that I've seen. For networking this difference is smaller, since most of the time is spent waiting on http calls, but for raw numbers Rust is faster.
      - Rust has memory safety without needing a garbage collector. This is because of the ownership system that Rust uses. Go uses a garbage collector, which make code easier to write. But this also makes Go slower than Rust.
      - Error handling in Rust is amazing compared to Go. In Rust we have Result types, which returns Ok(value) if function succeds or Err(error) when function fails. This makes error handling much more flexible and elegant compared to Go, where you always write if err != nil { // error handling }.
      - In Rust you have to handle errors, you can't ignore them. In Go I believe it's possible to ignore it, which opens up a bunch of future issues when code suddenly crashes.
      - Rust has proper sum types with enum which can contain data, which is great for making impossible cases impossible. For instance, we could declare an enum for eating state like this: enum Food { Taco, Burger { salad: boolean, chips: u32 }}
      - Rust has pattern matching which is something I personally love, with match, let, in function parameters, etc. Go only has basic if-else and switch statements.
      Ultimately, they are two languages for different purposes. Go is difficult to use on embedded since you can't fit the garbage collector on 16KB ram device. With Rust you can write code directly for embedded devices, with memory safety and blazing fast performance.
      I recommend you read these articles by Fasterthanli where he compares Go and Rust, and shows why he doesn't use Go anymore and uses Rust instead:
      - I want off Mr. Golang's Wild Ride
      - Lies we tell ourselves to keep using Golang

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

      for the reddit karma points

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

    Wow I just started my Rust journey last week, now on Chapter 8 of TRPL book. I also wanted to pick up Svelte and learn how to build a Rust backend to deploy a Svelte web app. Awesome discovering this video and your channel!

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

      Awesome! I will create a tutorial on this soon, just trying to figure out what I want to create.

  • @ok-alarm
    @ok-alarm ปีที่แล้ว +3

    Looking forward for Tauri with Svelte tutorials! 🎉

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

      Seems like most people are! The first video should be up this weekend, then I'll delve deeper next week 😄

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

    Nice overview of both Svelte and Rust. Looking forward to more from you. In particular, using SvelteKit with Tauri complete with data store. Thanks so much for great content!

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

      Awesome, thanks for the idea. I just released Hello, world! for Tauri and SvelteKit today. Will definitely look into data store as well.

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

    Damn I just discovered this channel in my recommendations, combining the two technologies I like most so far. Subbed and can't wait to see more!

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

      New video combining Svelte AND Rust will be released today 😄

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

    Immediately subscribed since svelte and rust are the two techs I like the most.
    However, I am curious what do you think about solid and qwik? Do you think svelte still hold up against them in terms of adoption unlike rust which can't be replaced easily?

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

      Solid and qwik are good especially in terms of performance, but they are still super nice compared to Svelte, which is recently more popular. For developing Svelte 5, they have hired the guy that made InfernoJs by himself, which is one of the fastest frameworks. Excited to see what the future holds!😄

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

      ​@@svelterust Wow, didn't know that, sounds like good news for the future of Svelte. I hope more people will adopt it. Waiting for more svelte and rust videos 😃

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

      @@laviray5447 Yeah I'm excited to see how the rework turns out😄I will release a new video tomorrow 😎

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

    You've earned yourself a subscriber if i can see some svelte and tauri content

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

      Yes, this will come soon.

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

    Excellent vídeo. How can i use the Wasmer tutorial with Svelte?

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

      Hello, I will create a tutorial which is built on top of the Wasmer tutorial where I create a frontend with Svelte😄

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

      The quick answer is to add a web framework like Axum, Actix or Rocket to interact with the Wasmer code and Svelte to interact with this server. This is what I've done here, which I'll make a video on soon: github.com/knarkzel/cloud

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

    Can you do a couple small project videos (like a todo-app) that integrates Rust and Svelte? Thanks :)

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

      Yeah definitely, can do something like that. Added to video ideas 👍

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

    love the emcas style youtube channels like "the power of prolog" channel

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

      I watched all of his videos back when I had Prolog for an exam 😄

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

      @@svelterust He's truly outstanding! It appears that your videos have a comparable impact of originality!

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

    Thank you for this video! I am really looking forward to your tutorials!
    I am learning rust from scract to build a cross platform app
    For the back end, I was thinking of using axum, sqlx
    For the front-end... I was thinking of using dioxus (I don't know whether you heard of it?). But perhaps your tutorials will make me choose Sveltekit + Tauri instead 😁

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

      SvelteKit + Tauri is the way to go, it's the best of both worlds. Blazing fast performance with amazing developer experience. Rust frontend is too immature😄

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

      I have used Dioxus, there's a starter pack for it in my GitHub.

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

      @@svelterust
      First message: You're making me really excited for it :D Using that stack, do you think it will be possible to create an apps that requires monitoring people's app usage (and perhaps access bluetooth)? e.g. get stats of android, ios, and mac/windows, and sync everything to one back end to then serve stats on the front-end
      Second message: awesome! I will go check it out. Still, for cross platfrom, you would recommend sveltekit + tauri ?

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

      @@yorgohoebeke First message: It is possible to create that application as long as you have access to native code, such as with Tauri. So Dioxus + Tauri or SvelteKit + Tauri. Tauri would handle access to bluetooth, get stats of Android, iOS, Mac/Windows and sync everything to another backend that stores it with a database.
      Second message: Yeah, SvelteKit + Tauri is great not only for cross platform, but also for fast development.

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

      What to use for backend in rust??

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

    2 of my favorite things

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

    How does one use svelte without svletekit

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

      You can create a Svelte project by running this:
      - npm init vite
      - Select the Svelte version, not SvelteKit
      With a regular Svelte project you do need to add a router yourself, and you don't get SSR like in SvelteKit. You can use adapter-static instead if you want to use SvelteKit client-side only.

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

      ​@@svelterust Thanks, you wrote a great reply to that question. However what I really meant to say is WHY does one use svelte without svletekit. The benefits of SSR for users' UX is impossible to beat.

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

      @@edhahaz Some people only use Svelte without SvelteKit. Me personally, I use SvelteKit for everything because it's so good 😄

    • @명경민-m2w
      @명경민-m2w ปีที่แล้ว

      @@svelterustThen that means you are using Node for your backend?

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

      @@명경민-m2w There's multiple adapters for SvelteKit. There's the auto-adapter, node-adapter, static-adapter etc. With the node adapter you get Node for backend. With the static-adapter, you only get Svelte for frontend with the SvelteKit routing system.

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

    Before you taking Rust, you should know about the controversy recently happened inside Rust Community.
    Refer little bit about it. 🦀

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

      Yeah it's true that there's been some controversy recently with the Rust Foundation and the trademark policy, but this is just politics. The proposal was declined 😄

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

    drogon + svelte + postgresql

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

      Drogon is quite fast but it's in C++. Me personally, I love Rust.

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

    I hate the templateing language of svelte

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

      I thought it looked odd at the beginning, but after using it I love it now. What do you prefer instead?

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

      @@svelterust I do like my JSX, React aint perfect, but I'm a bit curious about Solid and also Leptos.

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

      @@marcusrehn6915 I would recommend trying out Svelte and get used to it. Then, you'll realize how much easier Svelte is 😄

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

      ​@@svelterust I probably will at some point 😉

  • @JorgeMartinez-xb2ks
    @JorgeMartinez-xb2ks ปีที่แล้ว

    I love both. Subbed