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

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.พ. 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_the_moon_warpd...
    Keyboard: Glove80 - www.moergo.com/collections/gl...
    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
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @codetothemoon
    @codetothemoon  2 หลายเดือนก่อน +7

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

  • @irlshrek
    @irlshrek 2 หลายเดือนก่อน +76

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

    • @RootsterAnon
      @RootsterAnon 2 หลายเดือนก่อน +6

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

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +22

      just trying to keep everyone guessing 🙃

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

      I thought I learned something new! :P

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

      Yes, we were listening!

    • @natew4724
      @natew4724 8 ชั่วโมงที่ผ่านมา

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

  • @kearfy
    @kearfy 2 หลายเดือนก่อน +10

    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  2 หลายเดือนก่อน +2

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

  • @0xfrian
    @0xfrian 2 หลายเดือนก่อน +7

    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  2 หลายเดือนก่อน +1

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

  • @liamwoodleigh
    @liamwoodleigh 2 หลายเดือนก่อน +12

    Would love to see the SurrealDB TiKV set up video!

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +3

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

  • @brivism
    @brivism 2 หลายเดือนก่อน +35

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

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

      Cause it’s new 😂😂😂

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +16

      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 2 หลายเดือนก่อน +4

      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)

  • @ygormartinsr
    @ygormartinsr 2 หลายเดือนก่อน +3

    Looking good, Ken!

  • @BenjaminBenson-lc1ux
    @BenjaminBenson-lc1ux 2 หลายเดือนก่อน +13

    lord have mercy i'm about to rust

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +2

      ooo is this a GilstrapTV reference??

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

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

    • @olsuhvlad
      @olsuhvlad 2 หลายเดือนก่อน +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)

  • @RootsterAnon
    @RootsterAnon 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน +2

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

  • @nanashi2622
    @nanashi2622 26 วันที่ผ่านมา

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

    • @nanashi2622
      @nanashi2622 26 วันที่ผ่านมา

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

  • @EbonySeraphim
    @EbonySeraphim 2 หลายเดือนก่อน +13

    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  2 หลายเดือนก่อน

      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 หลายเดือนก่อน

      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.

  • @user-hu2rs5kv1r
    @user-hu2rs5kv1r 20 วันที่ผ่านมา

    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)?

  • @alexanderleitner8143
    @alexanderleitner8143 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน +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. th-cam.com/video/S8Usi3zsLIs/w-d-xo.htmlsi=awi0Zbdl3hUJoonw

  • @vsuryabhargava
    @vsuryabhargava 2 หลายเดือนก่อน +6

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

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +3

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

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

    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.

  • @severgun
    @severgun 2 หลายเดือนก่อน +14

    terminal with login is just officialy keylogger

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +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

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

      @@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 2 หลายเดือนก่อน +1

      @@codetothemoon This whole post is a cope

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

    the dryness is so great. 😆

  • @ewe-studios
    @ewe-studios 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน +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 2 หลายเดือนก่อน

      Great point, thanks a lot, appreciate that really

  • @fionawashere1086
    @fionawashere1086 2 หลายเดือนก่อน +4

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

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +1

      ahh thanks for pointing this out!

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

      @@codetothemoon

  • @artursradionovs9543
    @artursradionovs9543 2 หลายเดือนก่อน +3

    Love Rust

  • @MikeNugget
    @MikeNugget 15 วันที่ผ่านมา

    Is there any service oriented architecture example for Rust?

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

    How Tailwind was included to Dioxus?

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

    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.

  • @alexeinunez778
    @alexeinunez778 2 หลายเดือนก่อน +4

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

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +2

      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 2 หลายเดือนก่อน +1

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

  • @traviswhitten792
    @traviswhitten792 24 วันที่ผ่านมา +1

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

    • @codetothemoon
      @codetothemoon  24 วันที่ผ่านมา +1

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

  • @irrelevantdata
    @irrelevantdata 15 วันที่ผ่านมา

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

  • @chrisray9653
    @chrisray9653 2 หลายเดือนก่อน +2

    Which DB can I use locally and install with Brew?

    • @MingweiZhang
      @MingweiZhang 2 หลายเดือนก่อน +1

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

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +1

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

  • @thurston04
    @thurston04 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน +1

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

  • @ryangamv8
    @ryangamv8 2 หลายเดือนก่อน +2

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

  • @abdushakoor0099
    @abdushakoor0099 2 หลายเดือนก่อน +2

    had me at blockchain 😂

  • @babiecoop
    @babiecoop 2 หลายเดือนก่อน +2

    When Warp supports zellij I'll give it a try

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

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

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

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

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

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

  • @user-yw6nw8so2n
    @user-yw6nw8so2n 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน

      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

    • @user-yw6nw8so2n
      @user-yw6nw8so2n 2 หลายเดือนก่อน

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

  • @rohanshukla2632
    @rohanshukla2632 2 หลายเดือนก่อน +1

    DRAWS stock to the moon

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

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

  • @OCTAGRAM
    @OCTAGRAM 3 ชั่วโมงที่ผ่านมา

    I want all Ada stack

  • @Mempler
    @Mempler 2 หลายเดือนก่อน +1

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

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

      Doesn’t Tauri just embed a web view?

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

      @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 2 หลายเดือนก่อน +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 2 หลายเดือนก่อน

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

    • @crab-cake
      @crab-cake 2 หลายเดือนก่อน

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

  • @bobfearnley5724
    @bobfearnley5724 2 หลายเดือนก่อน +1

    Flutter in Rust when?

    • @omkarmahajan9918
      @omkarmahajan9918 2 หลายเดือนก่อน +5

      dioxus is alternative to flutter, react native and react

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

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

  • @pearl911
    @pearl911 2 หลายเดือนก่อน +8

    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  2 หลายเดือนก่อน

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

    • @pearl911
      @pearl911 2 หลายเดือนก่อน +2

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

  • @RemotHuman
    @RemotHuman 2 หลายเดือนก่อน +1

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

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

      I believe they just released a Linux version!

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

      Oh i did not know that thanks@@codetothemoon

  • @blackpolygon9306
    @blackpolygon9306 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน

      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

  • @DreadDeimos
    @DreadDeimos 2 หลายเดือนก่อน +1

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

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

      Thanks! 🙏 and more Warp for us I guess 😎

  • @jeffg4686
    @jeffg4686 26 วันที่ผ่านมา

    except, replace dioxus with bevy

  • @adicide9070
    @adicide9070 2 หลายเดือนก่อน +1

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

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

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

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

    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.

  • @karacan2469
    @karacan2469 หลายเดือนก่อน +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

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

      thank you, glad you liked it!

  • @michaelbrauner
    @michaelbrauner 7 วันที่ผ่านมา

    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.

  • @omdangy
    @omdangy 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน

      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.

  • @francesay8478
    @francesay8478 2 หลายเดือนก่อน +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  2 หลายเดือนก่อน

      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 2 หลายเดือนก่อน +1

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

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

      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 2 หลายเดือนก่อน +2

      proprietary software = malware

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

    Don't use warp and am not going to.

  • @ev3rybodygets177
    @ev3rybodygets177 13 วันที่ผ่านมา

    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.

  • @comosaycomosah
    @comosaycomosah 2 หลายเดือนก่อน +2

    God no lol

    • @codetothemoon
      @codetothemoon  2 หลายเดือนก่อน +1

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

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

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

  • @christianm4906
    @christianm4906 2 หลายเดือนก่อน +2

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

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

      Howcome?

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

      @@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 2 หลายเดือนก่อน

      @@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 2 หลายเดือนก่อน

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

    • @edgarallan5758
      @edgarallan5758 2 หลายเดือนก่อน +5

      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 ;)