Modern All Rust Stack - Dioxus, Axum, Warp, SurrealDB

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Building a note-taking app using an all Rust stack. We walk through some of the technical decisions and deep dive into several pieces of the code.
    Check out the Warp terminal here: bit.ly/code_to...
    Keyboard: Glove80 - www.moergo.com...
    Camera: Canon EOS R5 amzn.to/3CCrxzl
    Monitor: Dell U4914DW 49in amzn.to/3MJV1jx
    SSD for Video Editing: VectoTech Rapid 8TB amzn.to/3hXz9TM
    Microphone 1: Rode NT1-A amzn.to/3vWM4gL
    Microphone 2: Seinheiser 416 amzn.to/3Fkti60
    Microphone Interface: Focusrite Clarett+ 2Pre amzn.to/3J5dy7S
    Tripod: JOBY GorillaPod 5K amzn.to/3JaPxMA
    Mouse: Razer DeathAdder amzn.to/3J9fYCf
    Computer: 2021 Macbook Pro amzn.to/3J7FXtW
    Lens 1: Canon RF50mm F 1.2L USM amzn.to/3qeJrX6
    Lens 2: Canon RF24mm F1.8 Macro is STM Lens amzn.to/3UUs1bB
    Caffeine: High Brew Cold Brew Coffee amzn.to/3hXyx0q
    More Caffeine: Monster Energy Juice, Pipeline Punch amzn.to/3Czmfox
    Building A Second Brain book: amzn.to/3cIShWf

КОМЕНТАРІ • 147

  • @codetothemoon
    @codetothemoon  7 місяців тому +10

    The code for the app we made in this video can be found here: github.com/MoonKraken/DrawsNotes

  • @irlshrek
    @irlshrek 7 місяців тому +88

    my heart sank when you said "blockchain" and then you fixed it lmao

    • @RootsterAnon
      @RootsterAnon 7 місяців тому +7

      Same here, my popcorn's dropped... xD

    • @codetothemoon
      @codetothemoon  7 місяців тому +25

      just trying to keep everyone guessing 🙃

    • @kearfy
      @kearfy 7 місяців тому +1

      I thought I learned something new! :P

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

      Yes, we were listening!

    • @natew4724
      @natew4724 4 місяці тому

      Got me so good. This is possible, but very expensive

  • @in_sa_ne
    @in_sa_ne 2 місяці тому +2

    Dioxus looks interesting. Can you make more videos on it. It will help noobs like me who's just starting out.

  • @BenjaminBenson-lc1ux
    @BenjaminBenson-lc1ux 7 місяців тому +19

    lord have mercy i'm about to rust

    • @codetothemoon
      @codetothemoon  7 місяців тому +2

      ooo is this a GilstrapTV reference??

    • @benjaminbenson2936
      @benjaminbenson2936 7 місяців тому

      ua-cam.com/users/shortsM4zwvl_1QWQ?si=XzEKdMXK5QbO16W2. Mostly a dumb reference to this video.

    • @olsuhvlad
      @olsuhvlad 7 місяців тому +1

      19 Lay not up for yourselves treasures upon earth, where moth and rust doth corrupt, and where thieves break through and steal:
      20 But lay up for yourselves treasures in heaven, where neither moth nor rust doth corrupt, and where thieves do not break through nor steal:
      21 For where your treasure is, there will your heart be also.
      (Mt.6:19-21)
      :)
      7 Thou shalt not take the name of the LORD thy God in vain; for the LORD will not hold him guiltless that taketh his name in vain.
      (Ex.20:7)

  • @EbonySeraphim
    @EbonySeraphim 7 місяців тому +19

    Not a big fan of using warp Terminal as a shell. There's enough of a problem with LLMs sucking in source code from everyone with publicly accessible code online using whatever licenses, and then selling usage of that LLM for profit. I don't want companies doing this with the entire shell. It's also mad shady because despite whatever intent or effort they might have to not transmit credentials like passwords and such, it's unavoidable if they don't know the context of the tool(s) being used that may make an input or even output a secret. My editor's contents, shell usage be a live service.

    • @codetothemoon
      @codetothemoon  7 місяців тому +1

      I think there's a natural tendency to assume worst case scenario when something like a terminal emulator requires you to log in. This post offers some perspective on this design decision www.warp.dev/blog/open-source-and-login-for-warp

    • @Capybarapf
      @Capybarapf 5 місяців тому

      valid points, same concern here. I try to not get blinded by comfort features, they will never outweight the security concerns for me.
      In the end we have to keep in mind that there is a company behind that wants to make some profit.
      And they invest in Ads (like here in the video) for a reason.
      It might be only a matter of time until something shady happens, and even if not the risk is too high for me.

  • @severgun
    @severgun 7 місяців тому +18

    terminal with login is just officialy keylogger

    • @codetothemoon
      @codetothemoon  7 місяців тому +2

      Any terminal could be a key logger, irrespective of whether it requires you to log in. This really puts the idea behind login into perspective: www.warp.dev/blog/open-source-and-login-for-warp

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

      @@codetothemoon I'll never use a closed source terminal emulator. It's a security dark hole. I hope they pay you a lot for this promotion because they are certainly hell bent on locking down our terminal into a proprietary bs.

    • @omdangy
      @omdangy 6 місяців тому +3

      @@codetothemoon This whole post is a cope

  • @brivism
    @brivism 7 місяців тому +37

    would love a bit more explanation why dioxus over leptos, axum over actix like you did with DB choice explanation

    • @CrazyLuke11
      @CrazyLuke11 7 місяців тому

      Cause it’s new 😂😂😂

    • @codetothemoon
      @codetothemoon  7 місяців тому +20

      thanks for the feedback! I should have mentioned this in the video but the decision between Dioxus and Leptos was more "hair splitting" than the DB decision, in that both have pretty similar capabilities and would be perfectly fine for this project. Leptos seems to be in a more mature state at the moment, but Dioxus has a really interesting long term vision of being like flutter in that it aims to support all platforms with one codebase. So choosing between the two is more like horse race betting and personal preference than matching capabilities to the requirements of the project. Axum vs actix is kind of similar, although they are more mature their difference in capabilities isn't really relevant for this particular project.

    • @edgarallan5758
      @edgarallan5758 7 місяців тому +7

      i use axum in production microservice(s) having used both axum is far more ergonomic for my use case (REST api to supplement the tonic gRPC side)

  • @fionawashere1086
    @fionawashere1086 7 місяців тому +6

    lazy_static is outdated. Use once_cell::sync::Lazy, or std's LazyLock once it lands.

  • @liamwoodleigh
    @liamwoodleigh 7 місяців тому +15

    Would love to see the SurrealDB TiKV set up video!

    • @codetothemoon
      @codetothemoon  7 місяців тому +5

      thanks for letting me know, I'll try to pencil this one into the schedule!

  • @vsuryabhargava
    @vsuryabhargava 7 місяців тому +7

    Great video.
    To go full rust stack shouldn't your editor also be a rust based editor like helix?😂

    • @codetothemoon
      @codetothemoon  7 місяців тому +3

      Hah, you’re probably right! Not using helix was a miss…

  • @pearl911
    @pearl911 7 місяців тому +9

    This video feels like it has less production quality then any other video on your channel. The video seems to be purely made just too sponsor Warp.

    • @codetothemoon
      @codetothemoon  7 місяців тому +1

      Thanks for the feedback! What could I have done to make it better?

    • @pearl911
      @pearl911 7 місяців тому +4

      @@codetothemoon The top comment was worded a bit rude, sorry about that. The video has almost 6 minutes of just talking about warp and it felt like every chance you had to meantion it was taken. I also feel that it shouldn't be part of the tech stack it's similar to including vscode. Personally I don't agree with the terminal emulator itself and alot of their view points so I got a bit overdramatic. Other then the large sponser sections I think the merging of Dioxus, Axum, and SurrealDB will be helpful to alot of people.

    • @spiderunderyourbed6893
      @spiderunderyourbed6893 23 дні тому

      I love the video! the multi-sponsored segments were a bit, much, I recommend making one big sponsor spot rather than scattered across the videos

  • @0xfrian
    @0xfrian 7 місяців тому +12

    Coming from a React background, building frontends with Rust is immediately intimidating. Thanks so much for creating these videos to further expose these topics to novice devs like myself

    • @codetothemoon
      @codetothemoon  7 місяців тому +3

      it can indeed be intimidating! really glad you got some value out of them!

  • @kearfy
    @kearfy 7 місяців тому +13

    Awesome video Ken, as always! I think it was your video that first got me into SurrealDB, which I'm still very happy with! 😀

    • @codetothemoon
      @codetothemoon  7 місяців тому +2

      thanks, really happy you liked it! I continue to be impressed with Surreal as well!

  • @RootsterAnon
    @RootsterAnon 7 місяців тому +7

    I would like to see you cover demo about Minikube, SurrealDb and TiKv. I used kubernetes and argocd to deploy it to cluster then I was able to access that app from browser. I followed the steps from docs and watched talk with Ryota how he did the same. His talk was not that long but maybe you can cover that topic as production solution. Great video!

    • @codetothemoon
      @codetothemoon  7 місяців тому +2

      thanks for the feedback, I'll add this to the list of video ideas!

  • @alexeinunez778
    @alexeinunez778 7 місяців тому +5

    Warp workflows are just bash functions basically but with no ability to save it to code and be useful to others ?

    • @codetothemoon
      @codetothemoon  7 місяців тому +3

      Funny you mention this, I originally had a section of the video comparing workflows to regular shell functions but cut it at the last minute. One value add of workflows is that you see the workflow inline as you are preparing to run it with argument descriptions. Because the contents of the workflow is placed in the terminal, you can also make slight modifications before running if necessary. Also, they are searchable via a fuzzy find. Regarding sharing - there is a mechanism for sharing a common pool of workflows with your team.

    • @DreadDeimos
      @DreadDeimos 7 місяців тому +1

      Fish shell would be a better comparison, especially considering they''ve recently fully rewrote to Rust.

  • @alexanderleitner8143
    @alexanderleitner8143 7 місяців тому +3

    Thanks for pointing out, that a login is necessary. This brings me straight to the point. How can I provide my own login here by using an open source login provider like authentik or authelia for my home lab cloud? Could you make a video about the middleware and bindings needed for authentication and authorisation logic when using axum? That would be great! Thanks.

    • @codetothemoon
      @codetothemoon  7 місяців тому +1

      I made a video about doing this with actix-web, I suspect much of it may be relevant in an axum context as well. ua-cam.com/video/S8Usi3zsLIs/v-deo.htmlsi=awi0Zbdl3hUJoonw

  • @omdangy
    @omdangy 6 місяців тому +2

    Really dissappointed in you taking sponsor from and advertising Warp. Their closed-source and mandatory login ethos is outrageous and encompasses everything that's wrong with the tech scene. A terminal should never be closed-source, it's ridiculous. I'm sure you'd agree with me which is why I'm even more disappointed.
    Love your content. Please don't sell out 💓

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

      thanks for your feedback! We're very fortunate to have so many great options for terminals, many of which are open source. If open source is more important to you than the features unique to Warp, then by all means use one of the open source ones. Warp's existence and my endorsement of it shouldn't be seen as a threat to that preference or the fantastic OSS community behind it.
      for context, I didn't just use Warp while recording this video. I'm endorsing it because I actually use it for my day to day work when nobody is looking.

  • @traviswhitten792
    @traviswhitten792 5 місяців тому +1

    Do you have the source code for this up on GitHub? If so, anyway I can get the link?

    • @codetothemoon
      @codetothemoon  5 місяців тому +1

      yep you can find it here! github.com/MoonKraken/DrawsNotes

  • @slamislife74
    @slamislife74 20 днів тому +1

    Tbh the ORm syntax does not look very easy to deal with :/

    • @codetothemoon
      @codetothemoon  11 днів тому +1

      not sure how I feel about it yet either. they've made another major release since this video, I may have to circle back to it and see if anything has changed

  • @sergey9679
    @sergey9679 6 місяців тому +1

    Don't use warp and am not going to.

  • @soyasher9965
    @soyasher9965 Місяць тому +1

    I just get lost in how to set up the project. dx new or cargo new?

    • @codetothemoon
      @codetothemoon  Місяць тому

      you can do it either way, but dx new might get you up and running slightly faster!

  • @artursradionovs9543
    @artursradionovs9543 7 місяців тому +4

    Love Rust

  • @sentinelaenow4576
    @sentinelaenow4576 3 місяці тому

    As a proof of concept, it's understandable, but Rust plus React feels like dealing with the worst of both worlds. Rust comes with a steep learning curve, React is overly complex with its aweful boilerplate, intricate state management, and convoluted hook system. Together, they bring none of the straightforwardness, ease and efficiency that JavaScript is widely known for.
    It’s like choosing to take your family across the country on a unicycle instead of a car. While it’s possible with enough training and determination, the journey is unnecessarily difficult, especially when there are much simpler and more efficient alternatives available.

  • @michaelbrauner
    @michaelbrauner 4 місяці тому

    I still don't understand why you don't just create a Symfony / Laravel app. The whole thing is 100 times easier and up to a certain point (which almost no web app will reach) fast and sufficient. The bottlenecks of webapps are not in the programming language.
    But yes, keep wasting all your time on all these implementations. I make money in the meantime working on my own projects on the side.

  • @karacan2469
    @karacan2469 5 місяців тому +1

    Very nice video that I can learn much about rust language but in 5 min you used lots of framework and names that I have to pause each 5 seconds and google it, you are so fast😂 5star

  • @thurston04
    @thurston04 7 місяців тому +1

    Why would storing our data in a file or folder (surreal lets you use a folder and it manages it's data in a series of files) be a bad thing? A script can run a backup however often you need and it's simple. And I missing something?

    • @codetothemoon
      @codetothemoon  7 місяців тому +2

      it's probably fine for many scenarios, but if you want load balancing / sharding it's not really an option

  • @abdushakoor0099
    @abdushakoor0099 7 місяців тому +2

    had me at blockchain 😂

  • @DreadDeimos
    @DreadDeimos 7 місяців тому +1

    I firmly believe that Warp is a cancer of an idea, but other than that, a nice overview, as always.

    • @codetothemoon
      @codetothemoon  7 місяців тому

      Thanks! 🙏 and more Warp for us I guess 😎

  • @MudroZvon
    @MudroZvon 3 місяці тому +1

    Why not Leptos?

    • @codetothemoon
      @codetothemoon  3 місяці тому

      check out the "build a chatbot" video I made, it happens to use Leptos

  • @TarasShabatin
    @TarasShabatin 4 місяці тому

    iTerm2 and zsh doing all the same things which Warp does.

  • @jeffg4686
    @jeffg4686 5 місяців тому

    except, replace dioxus with bevy

  • @David-iq1kd
    @David-iq1kd Місяць тому

    I'm really excited about the stack and would be soo interested to see one addition: SurrealDB also is able to be embedded into Rust. People love to demo to-do apps, but in real life, if your to-do app didn't work offline it would drive you nuts. I would love to see this same stack, with the addition of an embedded Surreal instance in the front-end Dioxus, that would occasionally back up to the server side Surreal instance. This would provide a local-first, and poor connection tolerant setup.
    It's also something that sounds beyond my skill level to implement, so I'd love to get a head start haha.

  • @brainstormsurge154
    @brainstormsurge154 5 місяців тому

    Cool video.
    Would be interesting to create a stack based on Zig once it's matured enough. Although there are certainly projects like Bun that have already been released but I'm just talking about once Zig 1.0 releases.
    I'm not familiar with every project but for terminal there's Ghostty (being tested by request so no public release yet) and for graphics there's Mach.

  • @ewe-studios
    @ewe-studios 7 місяців тому +1

    What screen resolution do you record your videos at? I am somwewhat unsure if i should use my 2560x1440 screen resolution for videos as I fear it might be too small for others to see, appreciate some insight in regards your process.

    • @codetothemoon
      @codetothemoon  7 місяців тому +2

      Higher resolution doesn’t have to mean smaller - the key is to increase your font size (if code) or zoom in with your browser (if web). In this video I actually used a tool called puppeteer to take screenshots of the web pages, which is amazing because it can do so at a higher resolution than my monitor. All of my screen recordings are done in 4K

    • @ewe-studios
      @ewe-studios 7 місяців тому

      Great point, thanks a lot, appreciate that really

  • @marcstreeter
    @marcstreeter 5 місяців тому

    really enjoyed the video (and must lend my love to the Warp team, the AI is such a huge help in the terminal) - I'm new to Rust and have been leaning more toward Poem because I generally have to interface with other services and need to expose some open-api/swagger. Would you approach this topic too (automatic swagger generation based on your restful api)?

  • @98f5
    @98f5 Місяць тому

    How do i pass context from the web window to the app

  • @ygormartinsr
    @ygormartinsr 7 місяців тому +3

    Looking good, Ken!

  • @babiecoop
    @babiecoop 7 місяців тому +2

    When Warp supports zellij I'll give it a try

    • @codetothemoon
      @codetothemoon  7 місяців тому

      haven't tried zellij with warp yet - what issues did you run into?

    • @babiecoop
      @babiecoop 7 місяців тому

      @@codetothemoon Warp eats the alt key input, so zellij has no idea when I use it for my binds

    • @KirinDave
      @KirinDave 7 місяців тому

      It seems a lot of features of Warp don't work when running under Zellij or Tmux.

  • @ryangamv8
    @ryangamv8 7 місяців тому +2

    Now we just need to figure out how to do styling using rust

  • @chrisray9653
    @chrisray9653 7 місяців тому +2

    Which DB can I use locally and install with Brew?

    • @MingweiZhang
      @MingweiZhang 7 місяців тому +1

      Surreal can. SQLite, duckdb are also your friends that can be installed with brew.

    • @codetothemoon
      @codetothemoon  7 місяців тому +1

      There are many, including SurrealDB. And Postgres, if you’re not doing all-Rust

  • @sawood2010
    @sawood2010 7 місяців тому

    When is rust's compile time going to get better? I have a small actix API that takes 20 minutes to compile in prod mode. I love rust, but the compile times prevent me from using it in any bigger project.

  • @ev3rybodygets177
    @ev3rybodygets177 4 місяці тому

    im so over AI being integrated into dev tools. If thats why you have to log into warp they are going to kill their terminal over search v2. ill just open a browser. no thanks.

  • @OCTAGRAM
    @OCTAGRAM 4 місяці тому

    I want all Ada stack

  • @francesay8478
    @francesay8478 7 місяців тому +6

    I'ma be real with you, warp is such a shitty terminal compared to the other options we have (like alacritty or wezterm). Forcing users to create an account for a bloody terminal is really dumb. So is integrating AI into it.

    • @codetothemoon
      @codetothemoon  7 місяців тому

      I can relate to not wanting to have to have an account, but I don't understand why integrating AI into a terminal would be a bad idea. ooc, would you be willing to log in to your kitchen refrigerator if it did all of the cooking and grocery shopping for you?

    • @pearl911
      @pearl911 7 місяців тому +1

      @@codetothemoon How is my fridge cooking and shopping??

    • @kodedart2311
      @kodedart2311 7 місяців тому

      To each their own. I've been using Warp over a year now and it's become my go to terminal. It's perfect for everyday use and the AI is truly a game changer even with the free tier limitations. The entire account system feels unnecessary even if it offers some benefits - but it's a minor inconvenience compared to the overall experience.

    • @Om4r37
      @Om4r37 7 місяців тому +2

      proprietary software = malware

  • @MikeNugget
    @MikeNugget 5 місяців тому

    Is there any service oriented architecture example for Rust?

  • @PrestonThorpe-d1x
    @PrestonThorpe-d1x 7 місяців тому +3

    Yup. not logging into my terminal. No thx on the closed source AI terminal. I understand you have to take sponsorships tho and I appreciate your honesty

    • @codetothemoon
      @codetothemoon  7 місяців тому

      there are many that would agree with you! this post may give extra perspective on the decision to require login www.warp.dev/blog/open-source-and-login-for-warp

    • @PrestonThorpe-d1x
      @PrestonThorpe-d1x 7 місяців тому

      @@codetothemoon btw excellent videos man, I bought my glove80 because of you and I love it. Keep it up 👍

  • @4115steve
    @4115steve 3 місяці тому +1

    mega cool, I'm learning rust as my first language and going all in using something like this stack

    • @codetothemoon
      @codetothemoon  3 місяці тому +1

      wow, hats off to you! very brave for tackling Rust as your first language!

    • @4115steve
      @4115steve 3 місяці тому

      @@codetothemoon I’m off to a late start at 34 so I figured it’ll get me ahead of the curve. I’m thankful for great UA-cam tutorials and chat bots. Your channel is great, thanks for all the info.

    • @4115steve
      @4115steve 3 місяці тому

      @@codetothemoon I should probably also mention I spent hours watching C tutorials, but I haven’t typed much code and can only read code and not recall much.

  • @Mempler
    @Mempler 7 місяців тому +1

    You forgot to use tauri, for the desktop experience, otherwise it wouldnt be an "all rust stack app"

    • @codetothemoon
      @codetothemoon  7 місяців тому

      Doesn’t Tauri just embed a web view?

    • @Mempler
      @Mempler 7 місяців тому

      @codetothemoon pretty much, but it's very similar to electron with more security features. Since on Win32 it uses Edge and on macOS/Linux it uses WebKit.
      Since you built a fullstack application for the web, this could've fit perfectly

    • @crab-cake
      @crab-cake 7 місяців тому +1

      ​@@Mempler dioxus supports web, desktop, and ios/android. the desktop and mobile is based on webview like tauri. however, dioxus is experimenting with wgpu rendering.

    • @Mempler
      @Mempler 7 місяців тому

      @@crab-cake so effectively like react & react native

    • @crab-cake
      @crab-cake 7 місяців тому

      @@Mempler i would say it's more similar to flutter. mostly because it's an all-in-one platform, whereas react and react native are separated and even completely different dependencies. their goals seem to align more with flutter.

  • @nixrohan
    @nixrohan 7 місяців тому +1

    DRAWS stock to the moon

    • @codetothemoon
      @codetothemoon  7 місяців тому

      if only there were a way to place bets on these things!

  • @RemotHuman
    @RemotHuman 7 місяців тому +1

    I wish I could use warp but I don't have a mac

    • @codetothemoon
      @codetothemoon  7 місяців тому

      I believe they just released a Linux version!

    • @RemotHuman
      @RemotHuman 7 місяців тому

      Oh i did not know that thanks@@codetothemoon

  • @cramhead
    @cramhead 4 місяці тому

    Thanks for creating this video. It's nice to have such a deep overview of the tech stack and some of the potential issues.

  • @nanashi2622
    @nanashi2622 5 місяців тому

    I shy away from Warp, but when you said vim motions, I'm sold.

    • @nanashi2622
      @nanashi2622 5 місяців тому +2

      On second thought, nah. I just added vi motions plugin for zsh. Warp is not too customizable like my current terminal emulator, alacritty.

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

    How Tailwind was included to Dioxus?

  • @bobfearnley5724
    @bobfearnley5724 7 місяців тому +1

    Flutter in Rust when?

    • @omkarmahajan9918
      @omkarmahajan9918 7 місяців тому +5

      dioxus is alternative to flutter, react native and react

    • @codetothemoon
      @codetothemoon  7 місяців тому

      I think dioxus aims to be a Flutter alternative (though not nearly as production ready at the moment)

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

    the dryness is so great. 😆

  • @esjay3562
    @esjay3562 4 місяці тому +1

    I was quite interested in Dioxus until I read the following statement on the Dioxus webpage:
    "In the future, we plan to move to a custom web renderer-based DOM renderer with WGPU integrations (Blitz)."
    WebView, which is currently used, is really great, offers most of HTML 5 and CSS.
    I am so tiered of reinventing the wheel again and again. I doubt the custom solution will never get the same maturity and broad coverage of HTML, JS and Css.

  • @comosaycomosah
    @comosaycomosah 7 місяців тому +2

    God no lol

    • @codetothemoon
      @codetothemoon  7 місяців тому +1

      haha, what would you use instead? if I couldn't use Rust I'd probably use SvelteKit

    • @comosaycomosah
      @comosaycomosah 7 місяців тому

      @@codetothemoon tbh if I knew rust better I'd use it 💀 but yea def sveltekit. I had the misfortune of starting with js when I was just beginning to learn programming so it's my default still sorta lol

  • @irrelevantdata
    @irrelevantdata 5 місяців тому

    qdrant can do both semantic and keyword search, as in you should be able to store text data in it as well as vectors.

  • @christianm4906
    @christianm4906 7 місяців тому +2

    Rust is a failure from day 1. It's not a good time to learn Rust

    • @codetothemoon
      @codetothemoon  7 місяців тому

      Howcome?

    • @christianm4906
      @christianm4906 7 місяців тому

      @@codetothemoon It's been at least 12 years since we first heard of Rust, and despite the extensive marketing campaign it has received, it is still considered a niche programming language. Don't get me wrong, I'm not saying Rust is a bad programming language. In fact, it might have good features missed in C and C++, but its approach forces developers to either write everything from scratch or deal with the pitfalls of the 'extern-function approach' for integration with the outside world. The industry has invariably proven that this approach is a failure from day one. A very good example of this is the Dart programming language. It was originally intended to replace JavaScript, and despite being better than JavaScript in many ways, it miserably failed to do so. Similarly, Rust is unlikely to succeed in replacing C or C++. The reason is that Rust and C++ are fundamentally incompatible.
      The trend is clear for modern programming languages that have been successfully adopted: TypeScript interoperates with JavaScript; C++ interoperates with C, Kotlin interoperates with Java. Even Zig can transparently interoperate with C. Mojo also looks like a much more attractive alternative than Rust as it can run as fast as C, it offers memory-safe features like Rust with an easier and cleaner syntax while being compatible with Python.
      I see more future in replacing C/C++ with other approaches such as CPP2 or Carbon, which are projects by engineers at Microsoft and Google, respectively. These languages solve the problems with C and C++ while offering a cleaner syntax and interoperation with C/C++ code. As soon as the first production-ready version of either CPP2, Carbon, or Mojo gets released, which is about to happen soon, the future of Rust will resemble the present of the D programming language. To add more salt to the wound, Rust has already become too verbose and complex, so much so that even Rust developers are feeling frustrated with it. I know a few government agencies might be advocating for memory-safe languages, but it doesn't necessarily have to be Rust. In fact, there are memory safety languages out there with far greater adoption than Rust, such as Java, C#, Python, Swift, and Go. And if performance is also important, Rust has to compete with the already industry-established C and C++, now CPP2, Carbon, Mojo, Zig, and Go. As I said before, it is not a good time to learn Rust and reinvent the wheel in a language just for the sake of doing so. Rust didn't replace C or C++ and it never will. Just check GitHub, Stack Overflow, and other statistics. The truth is that much more code is being written in C and C++ than in Rust. It's been like that for decades. A new programming language, to succeed, needs to guarantee code reusability; otherwise, it will miserably fail.

    • @christianm4906
      @christianm4906 7 місяців тому

      @@codetothemoon It's been at least 12 years since we first heard of Rust, and despite the extensive marketing campaign it has received, it is still considered a niche programming language. Don't get me wrong, I'm not saying Rust is a bad programming language. In fact, it might have good features missed in C and C++, but its approach forces developers to either write everything from scratch or deal with the pitfalls of the 'extern-function approach' for integration with the outside world. The industry has invariably proven that this approach is a failure from day one. A very good example of this is the Dart programming language. It was originally intended to replace JavaScript, and despite being better than JavaScript in many ways, it miserably failed to do so. Similarly, Rust is unlikely to succeed in replacing C or C++. The reason is that Rust and C++ are fundamentally incompatible.
      The trend is clear for modern programming languages that have been successfully adopted: TypeScript interoperates with JavaScript; C++ interoperates with C, Kotlin interoperates with Java. Even Zig can transparently interoperate with C. Mojo also looks like a much more attractive alternative than Rust as it can run as fast as C, it offers memory-safe features like Rust with an easier and cleaner syntax while being compatible with Python.
      I see more future in replacing C/C++ with other approaches such as CPP2 or Carbon, which are projects by engineers at Microsoft and Google, respectively. These languages solve the problems with C and C++ while offering a cleaner syntax and interoperation with C/C++ code. As soon as the first production-ready version of either CPP2, Carbon, or Mojo gets released, which is about to happen soon, the future of Rust will resemble the present of the D programming language. To add more salt to the wound, Rust has already become too verbose and complex, so much so that even Rust developers are feeling frustrated with it. I know a few government agencies might be advocating for memory-safe languages, but it doesn't necessarily have to be Rust. In fact, there are memory safety languages out there with far greater adoption than Rust, such as Java, C#, Python, Swift, and Go. And if performance is also important, Rust has to compete with the already industry-established C and C++, now CPP2, Carbon, Mojo, Zig, and Go. As I said before, it is not a good time to learn Rust and reinvent the wheel in a language just for the sake of doing so. Rust didn't replace C or C++ and it never will. Just check GitHub, Stack Overflow, and other statistics. The truth is that much more code is being written in C and C++ than in Rust. It's been like that for decades. A new programming language, to succeed, needs to guarantee code reusability; otherwise, it will miserably fail.

    • @christianm4906
      @christianm4906 7 місяців тому

      @@codetothemoon I answered to this but my comment gets removed.

    • @edgarallan5758
      @edgarallan5758 7 місяців тому +6

      at microsoft we are moving about 90% of our c# code over to rust. if its a failure i am a very well paid failure ;)

  • @blackpolygon9306
    @blackpolygon9306 7 місяців тому +1

    10:48 "you can get a lot of cryptic error messages, especially when working in Rust".
    Isn't good error messages one of the selling points of Rust?

    • @codetothemoon
      @codetothemoon  7 місяців тому

      I should have expanded a bit more on this. to your point, most of the Rust error messages are pretty good, but I personally find lifetime related ones hard to understand sometimes. Also some of the ones I've seen when working with Dioxus specifically were atrocious

  • @adicide9070
    @adicide9070 7 місяців тому +1

    I think Rust is already deprecated and it's time to do Mojo, no?

    • @codetothemoon
      @codetothemoon  7 місяців тому

      Hah! Maybe not quite yet… but in the future who knows

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

    I am still trying to understand why I need to login to my terminal.
    Nearly everything you showed can be done locally with a little bit of configuration. Tools like oh-my-ash are just straight forward.