Why is this man... talking to me in the dark, close up with a smile on his face , low voice, saxophone in the background, winking rather slowly? Where is my glass of wine?
You are serious or trying to be funny? Obviously what you said is not true. Its crazy scammers like you got views. Reported for misinformation I hope it will do something.
I have heard maybe only one or two isolated cases in the past 3 years of people actually switching from JS to Rust. Most of the time the switch is between frameworks, and the latest trend is switching to Svelte.
@@bluelinden +1, it's something I also miss terribly. how's it going so far? over here, we noticed significant improvement switching to rust and cant wait to do more of it
@@nubunto currently dealing with either a rust-analyzer or NixOS bug that prevents rust-analyzer from checking procedural macros. something within glibc is freaking out about an unknown symbol, “__tunable_is_initialized”. cargo builds just fine, so i have no idea what’s going on.
@@perc-ai javascript is most likely always going to be around. rust is pretty much the standard at this point for javascript tooling, but it still has a long ways to go for everything else. the web ecosystem needs more time and backing from large companies to take off in other places. it's still very new in the web space but the encouraging thing for rust is that it has been adopted at an extremely fast rate.
@@arturfil for devs started out absolutely. For experienced devs it is a breeze to build web apps in rust. At some point you have to ask yourself am i only going to know JS my whole career :/
@@perc-aiThing is there are a whole lot of older projects that needs supporting. A lot of big companies cant even afford re-writing their apps. Rust is rust it will be gone with time 😂 Its just doomed the moment it picks that name 😅
A lot more than 10 jobs but they are also very hard to get because they virtually all require prior commercial experience or experience of some complementary skill such as blockchain.
amethyst has been inactive for 2 years now. rocket only recently got support after a long time of inactivity. bevy for game development and axum or actix for backend. those are the stable recommended choices.
I feel like the fact that "Rust does not target your browser but your system" (on 1:08) was a bit easily brushed off as something that would not change anything for people who are used to code in JavaScript. Like JS developers would just go: Ahh my code does not run in the browser any more and it is stuck here on my local machine. Ah well, I guess I will just code for myself from now on or maybe I could offer people to download an executable to run my programs, nobody will ever find that suspicious...
Rust is a different class of language to JS they are not interchangeable. Language class determine how it relates to memory and consequently this affects performance. JS is in the same class of language as Python, Perl, and PHP, mid tear languages such as C#, Java, Go deal with memory in a slightly different way. And finally systems languages (Rust, C,, C++,Zig,) gives you control over more aspects of memory allocation (including where memory is allocated).
Rust is for systems programming, AAA games, performance critical tools etc. Webdev is better when JavaScript is used. Rust makes sense only for Above domains I mentioned and not for webdev
2:35 - it is not allowed not because name is already dropped, but because previous invocation of print_string took ownership of the value, so second invocation just do not have access to that value.
You actually answered a different question for me: why Rust is better than C/C++. Memory controllling is exhausting but Rust makes it more easy and fun. I am already thought about learning go and kotlin, but now I add Rust to the list
It's not that js devs are moving to rust, it’s js tools are moving to rust. There is a huge difference, which means, no matter how good rust promises, it needs js to live.
I've breathy read the "Rust the programming language" book and none of the imports/exports or the overall module system worked like it does in JavaScript. (Even compared with older CJS syntax.) I think that JS devs are not abandoning JS in favor of Rust, it's only those who create tools for the JS ecosystem, so what is really happening is that we are becoming like Python, and it's C-based libraries.
8:43 Saying that "the final expressions of the if and else blocks return automatically" can be confusing on its own. Is this a behavior exclusive to the if else block? I think its important to clarify that the return value of a block is set to the last expression if the semi-colon is left out. This is true for any block of code, not only if else blocks
8:48 - rust doesn't have ternary operator (e.g. foo ? a : b), however if blocks returns the value (so you can do let foo = if meaning_of_life { 42 } else { 0 }), and that's why you don't need return in that case. same goes in main -- you actually return the void type (), returned by each of match arm.
If the first argument is about memory management, I'm not really sold, since I've never faced these problems with either JavaScript or TypeScript. It seems like memory has been fairly abundant enough with modern challenges I've faced. I'm just not seeing why any of this would make JavaScript developers make a change. Sure, if I have some very performance sensitive algorithm or use-case, but why would I be there in the JS in the first place?
JavaScript is memory safe but it does use a lot more memory(it’s a lot more evident in large scale backend web applications). If you have a performance/memory critical need then Rust is way more preferable. Personally I think we will see a lot more backend adoption for Rust but not so much for Frontend but we shall see.
@@nezudev JS is not memory-safe. You can easily create a memory leak and JS provides no tools to find and solve the problem. You'll have weeks of meditating on your code and doing resources consumption snapshots to even locate the problem if it ever happens to you. And you'll never feel confident about your other projects in JS anymore.
Could anyone recommend why to learn rust as a frontend developer? I’m interested in learning but not sure if it’s worth it and how to do the switch, thanks
Learning a new language is fun and useful. But there are more Go backend jobs than Rust jobs. I love Rust, but JavaScript is not going away. Maybe in 5 years there will be a little more Rust jobs than Go, hopefully. As a secondary language can be useful.
For me it's more like: I look at the tools I use most (WezTerm, Nushell, Helix, Broot, ripgrep) and they're all built with Rust. It just makes sense to use it.
"You can control how much memory is reserved with each type. Instead of the inferred i32, which reserves space for numbers from about negative two million to positive two million..." Um, you're off by 3 orders of magnitude: 2^32 = +4B, which means 2^31 = ±2B.
God knows how I'd love to see Rust frameworks for web having high adoption! Web really needs even better tooling than TS, and JS needs a competitor. Competition always brings benefits to customers!
It always surprises me how people discover other languages and stop liking their beloved JS/TS. Having previously known C#, Java, Python and some Go. None of these languages are perfect, but when I entered the world of JS, I couldn't believe that a language with such a nightmarish developer experience could be so popular. You really have to be ignorant of what the rest of the programming world and languages are like to settle for and like JS.
Naa man. I can get things done in half of the time for alternatives. The ecosystem is rich and its s productive language. Rust is none of the above. The web is js, what would you want rust unless you're maybe doing tooling?
@@aberba That's a very hard take. TS+Rust dev here. There's no way I would develop anything serious in Typescript. You have to be extremely careful with it, as if you're carrying a glass dish on top of your head while performing in a circus. Or you can be relentless and then spend days debugging. Not at all the case with Rust which immediately tells you if you have a potential error. Or if you forgot to check some enum variant. Or you haven't handled the network failure.
+1 for referring to official docs and not encouraging users to watch hours and hours of videos to learn Rust. The best way to learn is official docs and practice. Thanks for a great video!
JS developers switching to Rust ?? Maybe some do, but it's definitely not a trend. If you have said this about NodeJs developers you could have had a point, but even then that would be far fetched.
The web is the biggest and most influential platform ever. The overlord of the internet is JavaScript, and it's been this way for almost 30 years. JS, HTML and CSS rule the web, and no matter how hyped the language of the week is, or how much they try, they cannot reach the web without going through the web overlords. There's a lot of propaganda driven languages and tools, and the way you approached here, as if Rust would replace JS, is not only wrong but dishonest. A quick search about Rust shows how immature the ecosystem still is, with problems ranging from the insistent fight with the annoying borrow checker, binary bloat, unstable trait resolution, people constantly complaining they can't test their code because something irrelavant is blocking them, making them waste time between each iteration, and the persistent update break problem, that everytime a lib updates, programs would just stop compiling. Memory safety which is the main sale argument of Rust is absolutely irrelevant for JavaScript.
Just wanted to say that programs no longer complining after updating 3rd party dependencies is actually a good thing imho. The library obviously changed something about its APIs which your code used. This way, you immediately know you should go and check what changed. That's much better than waiting for the slight change to cause issues later on and having to actually debug your way find it. Maybe just my experience.
Thank you for showing the concepts in Rust programming language with some examples, but still Why JavaScript Devs are Switching to Rust in 2024? Missleading video title! Also at 7:02, i32 type holds values between -2,147,483,648 and 2,147,483,647, not -2,000,000 and 2,000,000.
Agree, this video is more about Rust than why JS Dev are switching to Rust. Especially as a Front end developer like me, after watching the whole video, I still don't understand why should I switch to Rust. It is not like I can write better React App or Vue App with Rust.
As soon as I saw that part of the video I paused it and scrolled down. This is the first comment I saw about it. Kind of made me question everything else he says. If you do not know 32bit is billions not millions...
Can anyone explain why JS still being single threaded language is most popular language for web development but multi threaded language like Java, C++ are not I get the syntax maybe difficult or most people will dont like it so on programming level why is that a problem.
Not sure how knowing JS helps learning Rust. I would learn C, C++ then go for Rust, in fact most companies still on C++. Rust might replace C++ which I dont think would happen ever, but why would JS/UI developers move to Rust ?
Excellent explanation of similarities between JavaScript and Rust. To be honest, I tried to learn a bit about Rust some years ago, but since I have no experience in low-level programming languages, I abandoned my learning. Now that I have seen these similarities, I'm not fear a lot about learning Rust like in the past.
Does anyone have seen any examples front-end on rust? I’ve just never seen anything like this… I don’t want argue about it, I really interested in it and want to understand is it possible that rust become one of the frontend part or it’s just a hipe
Yeah, yeah, but if I wanna run Rust in the browser, I'll have to compile it to WASM, and if I'm using WASM already, why would I use a meme language like Rust instead of C++? And I'm not even talking about the fact that WASM is an overkill for most use cases or that its context has no access to the DOM.
... and to be precise, a u8, u16, ..., u64 can store values between 0 (inclusive) and 2^n (exclusive). An i8, ..., i64 can store values between (-2)^(n-1), inclusive, and 2^(n-1), exclusive. As many values as unsigned types, but half the values are negative, one value is zero and half minus one are positive. The way I think of it: a u8 is a weighted sum of 1, 2, 4, 8, 16, 32, 64 and 128, where the weights are 0 or 1. An i8 is a weighted sum of 1, ..., 64 and -128 (same weights). In general, the highest number is negative instead of positive for signed types. So an i32 can store values between -2_147_483_648 and 2_147_483_647 (both inclusive).
@@slamislife74I only tried go a little and it was a while ago, but it is also a solid decision, Rust is better when it comes to managing memory, multithreading, and personally i like more the documentation, syntax and tooling of rust
bro i am a flutter dev and just started with web dev, it's just complete mess. I saw better option with Rust. But would rust be able to cut it. Like i'm in University and really wanna get placed next year.
Why would any JS dev working on web applications switch to a language that doesnt target the browser? Rust is an alternative to C or C++, not JS. Downvoted for clickbait title.
Because only lunatics think that one tool, JavaScript in this case, should be a solution to every problem. Moreover, a backend written in rust is more performant than one written in JavaScript.
Because devs be writing server side in JS 🤭 Django, .Net, Spring, Gin, Laravel are invisible to that species of devs. Neitherless they get hyped by Rust which in my opinion only makes sense for blockchain or wasm (in the web context). And so, after realization of what Rust is they feel confused and go right back to Dino, Bun, Node, T3 ect... 🥴
'mut' is just a cudgel to bully Rust programmers into adopting functional programming: "yes, you can code imperatively, but your lunch is mine and you must bow whenever you see me you must put mut mut mut mut mut mut mut mut mut mut everywhere, or it will be like your program is running in ROM".
I tried rust a few times already but, I find it to be a more verbose F#/Ocaml, the functional style works very well with the borrow checker. But the rest of the low level stuff and syntax verboseness from a DX perspective I find F# to be as type safe and not having to deal with me only management make it a better choice for me. I still keep an eye on rust though it is a cool language after all
I get memory management. It's like boosted garbage collector. It would have been so much easier if in javascript I had to dereference just one specific variable or construct to drop the memory usage. We have weak construcs now that make it easier to drop unused memory, and we can tell the garbage collector "hey lookey here, I don't need this thing" but rust still does it better.
Actually I plan on doing both. I'm not scared of Rust being new and friction full. Possibly because as a javascript hobbyist I am used to repeatedly banging my head on the table for safety (seems like too much in Rust) and complete lack thereof (javascript). Especially the call stack traces, when I did something wrong it gives me MAYBE one line from my code and then 9 more unrecognisable lines from V8, half of which are in files I can't even open if I tried to. Bones grow stronger on the points of breaking, or something like that. I also for some reason got myself into the "efficiency and speed" headspace recently (doing college level math in js), and I like how you can write in rust and then.. just make a wasm and use that wasm inside javascript for insane performance boost.
The only thing we desperately need is TSC to be ported to Rust or Go or Zig. That's it. That'd reduce CI/CD times by 2-3x which could yield faster turnaround times, and reduced cloud costs.
I’m excited for the future of rust and hope it’s my main stack in the future. Btw that’s an old benchmark you showed to us. Svelte is at version 5 and the one you showed was version 3.
Good tutorial, but please make the coding part a bit slower next time. The code is marked very quickly, many arrows appear and before you could read the code in detail, it has already disappeared again.
"Why JavaScript Devs are Switching to Rust" Because they won't. Even this title shows the incompetence of the creator. Or it's all about the clickbait, what is equally shameful. This channel is my ignore list's new member.
10:22 Amethyst is basically a dead project. Its been almost entirely superseded by Bevyengine. AFAIK only its ECS library is kept alive, almost exclusively because it's used in Veloren.
I understand different types for literals well, I'm doing matrix math and so for CPU cache optimisations (yes I'm still talking javascript) I'm using binary buffers. What will be hard to learn is all these new structures like Option and Rc and Vec... ah no that one is just like an array.
Good for them, I still look C++, Java, and C# for friendly in their syntax's. Hell, why they didn't preserved common reserved words? like const or function, and the object oriented related stuff...
Why invent a new syntax for something that will eventually take over the world? Just to fuck with everyone’s mind. Rust would have been perfect if it supported a C-like syntax, the same way JavaScript kindof writes like C.
Isn't Rust going to be way slower to develop in due to being a lower level language? Maintainability would be better and there would be fewer bugs, but would it ever make sense to do prototyping in it?
If/when Rust powers 95% of the internet tell me whether there will be one centralized site or a billion tutorials. P.S. Rust and other modern languages will be the future, but as of now it doesn't really matter, and when it comes to many use cases the end user doesn't care what technology you use.
I had a misconception when I first saw similar title of TH-cam videos. It turned out people who want to learn web development still have to learn JavaScript.
We are very excited to see what developers will build with Rust in 2024!
Let us know if you'd like to see Rust tutorials! 🦀
Oh yeaaaah bring in the tutorials😃
Very wanted!
Nice quick overview, but you didn’t explain why JS devs are switching.
Why is this man...
talking to me in the dark,
close up with a smile on his face ,
low voice, saxophone in the background,
winking rather slowly?
Where is my glass of wine?
You are serious or trying to be funny? Obviously what you said is not true. Its crazy scammers like you got views. Reported for misinformation I hope it will do something.
It's not JavaScript devs switching to Rust... It's tool devs switching to Rust.
Yes correct. For average JavaScript dev rust is overkill.
JS is going to get safe and fast because of this move i hope 70-90% of js code becomes rust
100% agree
@@pavlo276almost like JS is a crappy language to write tooling in...
Yea I was gonna say, javascript in terms of majority is not even close to the same use case....
I have heard maybe only one or two isolated cases in the past 3 years of people actually switching from JS to Rust. Most of the time the switch is between frameworks, and the latest trend is switching to Svelte.
Typescript + Svelte/SvelteKit is the way to go for web.
If we need to build desktop app, Svelte + Tauri is the best match.
add one more: my team is switching from NodeJS + TS to Rust
@@nubunto my solo project was originally in TS, but i've switched it to rust after struggling with typescript's relative lack of runtime type safety.
@@bluelinden +1, it's something I also miss terribly. how's it going so far? over here, we noticed significant improvement switching to rust and cant wait to do more of it
@@nubunto currently dealing with either a rust-analyzer or NixOS bug that prevents rust-analyzer from checking procedural macros. something within glibc is freaking out about an unknown symbol, “__tunable_is_initialized”. cargo builds just fine, so i have no idea what’s going on.
Using Rust for web development is like using nail clippers for your lawn.
Maybe 2 or 3 years ago, but now it is really good.
I’m finding that it’s pretty easy actually. Especially when using one of the popular frameworks.
No matter what you do , JavaScript will be around you like a shadow , you can ignore it but you can't remove / replace it
actually... we're staying with JavaScript
no we arent lol my company just switched over to leptos from next 11.
@@perc-ai javascript is most likely always going to be around. rust is pretty much the standard at this point for javascript tooling, but it still has a long ways to go for everything else. the web ecosystem needs more time and backing from large companies to take off in other places. it's still very new in the web space but the encouraging thing for rust is that it has been adopted at an extremely fast rate.
@@perc-aiunless it's warranted, it's a bad choice
@@arturfil for devs started out absolutely. For experienced devs it is a breeze to build web apps in rust. At some point you have to ask yourself am i only going to know JS my whole career :/
@@perc-aiThing is there are a whole lot of older projects that needs supporting. A lot of big companies cant even afford re-writing their apps.
Rust is rust it will be gone with time 😂
Its just doomed the moment it picks that name 😅
Switch from JavaScript to Rust if you want to get one of those 10 jobs that are available in Rust 😅
A lot more than 10 jobs but they are also very hard to get because they virtually all require prior commercial experience or experience of some complementary skill such as blockchain.
that is the main point! Rust for the real time backend, mainly, JS is for the frontent.@@kevinmcfarlane2752
That was last year, now it's more like 3 :)
rust is not about job its about lifestyle
@@dog4ikWTF?
On fighting the borrow checker: Don't put Rc/RefCell on everything, instead design the memory management of your types to avoid circular references.
Or just clone small stuff and profile later
I just recreate variables on every function calls
@@acebesmonte Which can be extremely performant if they're all on the stack.
amethyst has been inactive for 2 years now. rocket only recently got support after a long time of inactivity. bevy for game development and axum or actix for backend. those are the stable recommended choices.
I feel like the fact that "Rust does not target your browser but your system" (on 1:08) was a bit easily brushed off as something that would not change anything for people who are used to code in JavaScript. Like JS developers would just go: Ahh my code does not run in the browser any more and it is stuck here on my local machine. Ah well, I guess I will just code for myself from now on or maybe I could offer people to download an executable to run my programs, nobody will ever find that suspicious...
You can compile Rust into Web Assembly and run it in the browser just like Javascript.
you can run rust in the browser through wasm. ive done it. i even draw graphics to a canvas on wasm in my game engine
It's been two month I've been learning rust as a js dev and I'm having a blast. Currently building an emulator
Rust is a different class of language to JS they are not interchangeable. Language class determine how it relates to memory and consequently this affects performance. JS is in the same class of language as Python, Perl, and PHP, mid tear languages such as C#, Java, Go deal with memory in a slightly different way. And finally systems languages (Rust, C,, C++,Zig,) gives you control over more aspects of memory allocation (including where memory is allocated).
YES! and if a youtuber just straight up makes lies for views it's time to unsubscribe and dislike
Rust can do what JS can with WebAssembly, and once you learn it well it is easier to use than JS (and C++, and C, and bash, and Python...).
Rust is for systems programming, AAA games, performance critical tools etc. Webdev is better when JavaScript is used. Rust makes sense only for Above domains I mentioned and not for webdev
2:35 - it is not allowed not because name is already dropped, but because previous invocation of print_string took ownership of the value, so second invocation just do not have access to that value.
You actually answered a different question for me: why Rust is better than C/C++. Memory controllling is exhausting but Rust makes it more easy and fun. I am already thought about learning go and kotlin, but now I add Rust to the list
dont you think why they dont make syntax like C, that'd be a killer feature, because Rust syntax is uglier
@@un_defined it's very explicit though, wide code is good code.
Syntax is just syntax
Golang is a great compromise for me with an exceptional standard library.
Cpp 11 also does this with smart pointers
It's not that js devs are moving to rust, it’s js tools are moving to rust. There is a huge difference, which means, no matter how good rust promises, it needs js to live.
I've breathy read the "Rust the programming language" book and none of the imports/exports or the overall module system worked like it does in JavaScript. (Even compared with older CJS syntax.)
I think that JS devs are not abandoning JS in favor of Rust, it's only those who create tools for the JS ecosystem, so what is really happening is that we are becoming like Python, and it's C-based libraries.
Pretty much any language outside of JavaScript will make you hate JavaScript, but it isn't going anywhere.
8:43 Saying that "the final expressions of the if and else blocks return automatically" can be confusing on its own. Is this a behavior exclusive to the if else block? I think its important to clarify that the return value of a block is set to the last expression if the semi-colon is left out. This is true for any block of code, not only if else blocks
8:48 - rust doesn't have ternary operator (e.g. foo ? a : b), however if blocks returns the value (so you can do let foo = if meaning_of_life { 42 } else { 0 }), and that's why you don't need return in that case. same goes in main -- you actually return the void type (), returned by each of match arm.
If the first argument is about memory management, I'm not really sold, since I've never faced these problems with either JavaScript or TypeScript. It seems like memory has been fairly abundant enough with modern challenges I've faced.
I'm just not seeing why any of this would make JavaScript developers make a change.
Sure, if I have some very performance sensitive algorithm or use-case, but why would I be there in the JS in the first place?
JavaScript is memory safe but it does use a lot more memory(it’s a lot more evident in large scale backend web applications). If you have a performance/memory critical need then Rust is way more preferable.
Personally I think we will see a lot more backend adoption for Rust but not so much for Frontend but we shall see.
@@nezudev JS is not memory-safe. You can easily create a memory leak and JS provides no tools to find and solve the problem. You'll have weeks of meditating on your code and doing resources consumption snapshots to even locate the problem if it ever happens to you. And you'll never feel confident about your other projects in JS anymore.
Could anyone recommend why to learn rust as a frontend developer? I’m interested in learning but not sure if it’s worth it and how to do the switch, thanks
Learning a new language is fun and useful. But there are more Go backend jobs than Rust jobs.
I love Rust, but JavaScript is not going away.
Maybe in 5 years there will be a little more Rust jobs than Go, hopefully.
As a secondary language can be useful.
yeah but the question was about "frontend" :)))))) @@AdamFiregate
For me it's more like: I look at the tools I use most (WezTerm, Nushell, Helix, Broot, ripgrep) and they're all built with Rust. It just makes sense to use it.
"You can control how much memory is reserved with each type. Instead of the inferred i32, which reserves space for numbers from about negative two million to positive two million..." Um, you're off by 3 orders of magnitude: 2^32 = +4B, which means 2^31 = ±2B.
God knows how I'd love to see Rust frameworks for web having high adoption! Web really needs even better tooling than TS, and JS needs a competitor. Competition always brings benefits to customers!
How? Browsers cant run rust
@@DiogoSilva-xx8nz They can with WASM
@@DiogoSilva-xx8nz 1. WASM. 2. Web doesn't only encompass the front-end.
@@renx81 wasm is a meme already, only fits a few edge cases. you wont see any ecommerce done with wasm ever
@@DiogoSilva-xx8nz maybe not right now but Figma uses wasm for their c++ code that runs in the browser.
It always surprises me how people discover other languages and stop liking their beloved JS/TS. Having previously known C#, Java, Python and some Go. None of these languages are perfect, but when I entered the world of JS, I couldn't believe that a language with such a nightmarish developer experience could be so popular. You really have to be ignorant of what the rest of the programming world and languages are like to settle for and like JS.
Naa man. I can get things done in half of the time for alternatives. The ecosystem is rich and its s productive language. Rust is none of the above.
The web is js, what would you want rust unless you're maybe doing tooling?
@@aberba That's a very hard take.
TS+Rust dev here. There's no way I would develop anything serious in Typescript.
You have to be extremely careful with it, as if you're carrying a glass dish on top of your head while performing in a circus. Or you can be relentless and then spend days debugging.
Not at all the case with Rust which immediately tells you if you have a potential error. Or if you forgot to check some enum variant. Or you haven't handled the network failure.
Agree with you. JS feels clumsy for me comparing with C#, Python, C++, Java (languages I know).
clumsy? really? C++ and Rust prroduction code is not clumsy? :)))@@andrry_armor
@@phoenix-tt I'm not sure you're building any serious web app then. How can you avoid js on the web?
+1 for referring to official docs and not encouraging users to watch hours and hours of videos to learn Rust.
The best way to learn is official docs and practice.
Thanks for a great video!
Is there any reason to switch? Do we have a framework to replace js with rust?
There's is front-end frameworks in Rust (some are quite fast too), but tbh, JS frameworks are still the right choice majority of the times.
JS developers switching to Rust ?? Maybe some do, but it's definitely not a trend. If you have said this about NodeJs developers you could have had a point, but even then that would be far fetched.
The web is the biggest and most influential platform ever. The overlord of the internet is JavaScript, and it's been this way for almost 30 years. JS, HTML and CSS rule the web, and no matter how hyped the language of the week is, or how much they try, they cannot reach the web without going through the web overlords. There's a lot of propaganda driven languages and tools, and the way you approached here, as if Rust would replace JS, is not only wrong but dishonest. A quick search about Rust shows how immature the ecosystem still is, with problems ranging from the insistent fight with the annoying borrow checker, binary bloat, unstable trait resolution, people constantly complaining they can't test their code because something irrelavant is blocking them, making them waste time between each iteration, and the persistent update break problem, that everytime a lib updates, programs would just stop compiling. Memory safety which is the main sale argument of Rust is absolutely irrelevant for JavaScript.
Just wanted to say that programs no longer complining after updating 3rd party dependencies is actually a good thing imho. The library obviously changed something about its APIs which your code used. This way, you immediately know you should go and check what changed. That's much better than waiting for the slight change to cause issues later on and having to actually debug your way find it. Maybe just my experience.
Well said. Rust is a different class/purpose language. This is mere hype
@7:12 talking about types: i32 can handle the range -2 billion to +2 billion , not 2 million.
Your VS Code is gorgeous. What theme and font are you using? I want the smae ones :))
This is amazing. I started learning rust a few weeks back but took a break. This video has me excited to get back into again!
Why did you stop? I'm trying to learn rust too.
Thank you for showing the concepts in Rust programming language with some examples, but still Why JavaScript Devs are Switching to Rust in 2024? Missleading video title!
Also at 7:02, i32 type holds values between -2,147,483,648 and 2,147,483,647, not -2,000,000 and 2,000,000.
Agree, this video is more about Rust than why JS Dev are switching to Rust. Especially as a Front end developer like me, after watching the whole video, I still don't understand why should I switch to Rust. It is not like I can write better React App or Vue App with Rust.
Great video! You did have one small mistake though. i32 range is around plus or minus 2 Billion, not million. Once again, great video!
As soon as I saw that part of the video I paused it and scrolled down. This is the first comment I saw about it. Kind of made me question everything else he says. If you do not know 32bit is billions not millions...
This seems silly. We won't sacrifice labor efficiency for optimizations for the majority of apps because it's useless.
Which is developers front or backend? Can I use rust in frontend instead of javascript,
Can anyone explain why JS still being single threaded language is most popular language for web development but multi threaded language like Java, C++ are not I get the syntax maybe difficult or most people will dont like it so on programming level why is that a problem.
Not sure how knowing JS helps learning Rust. I would learn C, C++ then go for Rust, in fact most companies still on C++. Rust might replace C++ which I dont think would happen ever, but why would JS/UI developers move to Rust ?
Excellent explanation of similarities between JavaScript and Rust.
To be honest, I tried to learn a bit about Rust some years ago, but since I have no experience in low-level programming languages, I abandoned my learning.
Now that I have seen these similarities, I'm not fear a lot about learning Rust like in the past.
Just rewrote and entire SAAS in rust. It was well worth it. WASM is awesome too.
How is rust used in web development?
I'm hoping there's a way to either set constants which can be called endlessly, and also invoking a mutable variable in an immutable way
There is a const keyword. I believe this also works:
let mut foo = 69;
let immutable_reference = &foo;
I switched a desktop app from javascript to rust and it improved 300% in size
@warpdotdev: what is an application of 'rust', especially comparing to js?
Does anyone have seen any examples front-end on rust? I’ve just never seen anything like this… I don’t want argue about it, I really interested in it and want to understand is it possible that rust become one of the frontend part or it’s just a hipe
small mistake at 7:10
you want to use Billion instead of Million.
Didnt Google show their first rust Linux Kernel, a few weeks ago?
Yeah, yeah, but if I wanna run Rust in the browser, I'll have to compile it to WASM, and if I'm using WASM already, why would I use a meme language like Rust instead of C++?
And I'm not even talking about the fact that WASM is an overkill for most use cases or that its context has no access to the DOM.
Its 2 000 000 000 + instead of 2 000 000 + btw, for the 32 bit integer.
yeah, that'd be more like i22 :-)
... and to be precise, a u8, u16, ..., u64 can store values between 0 (inclusive) and 2^n (exclusive).
An i8, ..., i64 can store values between (-2)^(n-1), inclusive, and 2^(n-1), exclusive. As many values as unsigned types, but half the values are negative, one value is zero and half minus one are positive.
The way I think of it: a u8 is a weighted sum of 1, 2, 4, 8, 16, 32, 64 and 128, where the weights are 0 or 1. An i8 is a weighted sum of 1, ..., 64 and -128 (same weights). In general, the highest number is negative instead of positive for signed types.
So an i32 can store values between -2_147_483_648 and 2_147_483_647 (both inclusive).
Still dont know, why devs would switch. Wrong title
I learned rust back in 2020 because some of the task require to be run faster, like image processing etc.
Belive me rust is worth it
Why Rust and not Go?
@@slamislife74I only tried go a little and it was a while ago, but it is also a solid decision,
Rust is better when it comes to managing memory, multithreading, and personally i like more the documentation, syntax and tooling of rust
bro i am a flutter dev and just started with web dev, it's just complete mess. I saw better option with Rust. But would rust be able to cut it. Like i'm in University and really wanna get placed next year.
This video is so well made. The animations, the editing, the content. I went ahead and signed in just to make a comment. Kudos!
Why would any JS dev working on web applications switch to a language that doesnt target the browser? Rust is an alternative to C or C++, not JS. Downvoted for clickbait title.
Because only lunatics think that one tool, JavaScript in this case, should be a solution to every problem. Moreover, a backend written in rust is more performant than one written in JavaScript.
Because devs be writing server side in JS 🤭
Django, .Net, Spring, Gin, Laravel are invisible to that species of devs. Neitherless they get hyped by Rust which in my opinion only makes sense for blockchain or wasm (in the web context).
And so, after realization of what Rust is they feel confused and go right back to Dino, Bun, Node, T3 ect... 🥴
'mut' is just a cudgel to bully Rust programmers into adopting functional programming: "yes, you can code imperatively, but your lunch is mine and you must bow whenever you see me you must put mut mut mut mut mut mut mut mut mut mut everywhere, or it will be like your program is running in ROM".
such a great overview! rust can be somewhat intimidating when you're analyzing example code for the first time and this helps a lot.
I'm learning Rust for few weeks and I am 𝗌̶𝗍̶𝗋̶𝗎̶𝗀̶𝗀̶𝗅̶𝗂̶𝗇̶𝗀̶ loving it 😄😀
Learn methods like .map .and_then .and .unwrap_or .as_ref .deref
Read a little about Arc/Rc/Mutex/Refcell/Box
Your life will be easier
JS devs are not switching to rust.
7:09 your i32 range is wrong BTW, it should be -2billion +to positive 2billion+
How does it de allocate the memory as soon as it's out of scope without it being costly?
Would you kindly share what you use to create those amazing animations? :D
what font are you using in your vscode?
What is your font in vscode, looks nice
one question where we can find jobs with RUST. May be some companies need it but it very specific companys
As a JS Dev, we're literally not going to rust 😂
JavaScript devs switching to TypeScript which is basically the similar thing.
No null? How then do you know if a value was set or not?
You have the option enum which either has a Some(yourvalue) or None
As a frontend web dev, how is switching to rust an option?
How can you even switch from React or Angular to Rust.....
Is this even possible to write frontend in Rust????
Ok, I HAVE to know the font used in the examples here...
Cascadia Code!
I tried rust a few times already but, I find it to be a more verbose F#/Ocaml, the functional style works very well with the borrow checker. But the rest of the low level stuff and syntax verboseness from a DX perspective I find F# to be as type safe and not having to deal with me only management make it a better choice for me. I still keep an eye on rust though it is a cool language after all
Great video. Just a small fix. At 7:13, you should say billion instead of million.
This video was awesome! Way underrated, keep it up
What font do you use? and whats the theme name?
what is the font you are using? :o
This video definitely inspired me to learn Rust, here we go 2024 🦀🚀. Thanks a lot and love Warp
There's no basis for the claim that a large portion of the ecosystem is switching to rust. The argument is not supported in this video
I get memory management. It's like boosted garbage collector. It would have been so much easier if in javascript I had to dereference just one specific variable or construct to drop the memory usage. We have weak construcs now that make it easier to drop unused memory, and we can tell the garbage collector "hey lookey here, I don't need this thing" but rust still does it better.
Actually I plan on doing both. I'm not scared of Rust being new and friction full. Possibly because as a javascript hobbyist I am used to repeatedly banging my head on the table for safety (seems like too much in Rust) and complete lack thereof (javascript). Especially the call stack traces, when I did something wrong it gives me MAYBE one line from my code and then 9 more unrecognisable lines from V8, half of which are in files I can't even open if I tried to. Bones grow stronger on the points of breaking, or something like that.
I also for some reason got myself into the "efficiency and speed" headspace recently (doing college level math in js), and I like how you can write in rust and then.. just make a wasm and use that wasm inside javascript for insane performance boost.
Such an insightful and well-done video! Thank you 😊
The only thing we desperately need is TSC to be ported to Rust or Go or Zig. That's it. That'd reduce CI/CD times by 2-3x which could yield faster turnaround times, and reduced cloud costs.
You have opened my eyes to Rust.
You're a true teacher.
This is the greatest video I've seen this week 👏👏👏👏👏👏🤝🤝🤝🤝🤝
I’m excited for the future of rust and hope it’s my main stack in the future. Btw that’s an old benchmark you showed to us. Svelte is at version 5 and the one you showed was version 3.
How to be a front dev, in the first place? I have learnt some skills but how?
What's that font you use for the code in your video?
looks like the "intel" font 🤔"Intel One Mono"
with increases on available ram and efficiency every year, is memory management really that much of an issue?
Amazing rust intro, as a js dev, I’d like to start my rust journey now~
Thanks for sharing 👍
Good tutorial, but please make the coding part a bit slower next time. The code is marked very quickly, many arrows appear and before you could read the code in detail, it has already disappeared again.
"Why JavaScript Devs are Switching to Rust"
Because they won't. Even this title shows the incompetence of the creator. Or it's all about the clickbait, what is equally shameful. This channel is my ignore list's new member.
10:22 Amethyst is basically a dead project. Its been almost entirely superseded by Bevyengine. AFAIK only its ECS library is kept alive, almost exclusively because it's used in Veloren.
Thanks for the overview. Love your terminal
is there is a possibility to run rust in webassembly?
I understand different types for literals well, I'm doing matrix math and so for CPU cache optimisations (yes I'm still talking javascript) I'm using binary buffers. What will be hard to learn is all these new structures like Option and Rc and Vec... ah no that one is just like an array.
Good for them, I still look C++, Java, and C# for friendly in their syntax's.
Hell, why they didn't preserved common reserved words? like const or function, and the object oriented related stuff...
Why invent a new syntax for something that will eventually take over the world? Just to fuck with everyone’s mind. Rust would have been perfect if it supported a C-like syntax, the same way JavaScript kindof writes like C.
Isn't Rust going to be way slower to develop in due to being a lower level language? Maintainability would be better and there would be fewer bugs, but would it ever make sense to do prototyping in it?
If/when Rust powers 95% of the internet tell me whether there will be one centralized site or a billion tutorials.
P.S. Rust and other modern languages will be the future, but as of now it doesn't really matter, and when it comes to many use cases the end user doesn't care what technology you use.
As a web developer moving to rust, what can I build with rust???
I had a misconception when I first saw similar title of TH-cam videos. It turned out people who want to learn web development still have to learn JavaScript.