Why is the JavaScript ecosystem switching to Rust?
JavaScript has been the dominant language for web development for many years. However, recently there has been a growing interest in Rust as an alternative language for building web applications. So, what is driving this shift in the JavaScript ecosystem towards Rust?
Performance and Memory Safety
Rust is a systems programming language that offers a high level of performance and memory safety. This makes it an attractive choice for developers who are building high-performance web applications. Rust’s strict compiler checks and emphasis on memory safety help to prevent common programming errors such as buffer overflows and memory leaks. This can lead to more robust and secure web applications.
Concurrency and Parallelism
Rust’s strong support for concurrency and parallelism makes it well-suited for building high-performance web servers and other server-side applications. With features such as async/await and the lightweight threading model provided by the async-std and tokio libraries, Rust allows developers to easily write efficient and scalable server-side code.
Community Support
The Rust community has been actively promoting the use of Rust for web development. There are a growing number of libraries and frameworks for building web applications in Rust, such as Actix, Rocket, and Warp. The Rust ecosystem also offers tools for frontend development, such as wasm-pack, which allows developers to build web applications using WebAssembly and Rust.
Developer Experience
Rust’s modern and ergonomic syntax, along with its strong type system and powerful tooling, make it a pleasant language to work with. Additionally, the Rust compiler provides helpful error messages and a robust package manager in Cargo. These features contribute to a positive developer experience, which is important for attracting and retaining developers in the JavaScript ecosystem.
Conclusion
Overall, the JavaScript ecosystem is switching to Rust due to its performance, memory safety, support for concurrency and parallelism, community support, and developer experience. As Rust continues to evolve and gain traction in the web development space, it is likely that more developers will consider using Rust as an alternative to JavaScript for building web applications.
Parallelism is great and all but concurrency is where it's at
I wager that it’s a mix between hype and the 3x speedup you can get (according to the debian benchmarksgame) when you go from JS to Rust. Re-using tooling from FF is naturally also free code …
Expecting a full featured DOM API written in Rust in built with web browser 😊 Hope we can write frontend browser apps with Rust soon 😊
Programming languages are a popularity contest. Now is Rust and maybe in the near future will be Zig or other. Rust is not "stable" enough for me in terms is leadership, etc. Things may go wrong very quickly. I want stability, but people continue obsessed with the promise of performance in same cases and just popularity in other cases, such as Python and JavaScript. It's always the same, for decades.
No we’re not rust is worse than C 😂 what an idiot
this makes me want to learn rust, will start learning rust once I get job so I can freely focus on learning rust
thanks for the video though 🙂
Turbopack – 1:24 – Bundler
Rspack – 2:13 – Bundler
Rspress – 2:52 –
Rolldown – 3:18 – Same as rollup
Parcel – 4:42 – Bundler
SWC – 5:56 –
OXC – 6:10 – Compiler
Lightning CSS – 6:22 – CSS
Tailwind CSS – 7:01
NX – 7:18
this was an excellent intro to rust. thank you
replace rustup, nvm, volta, n, fnm all with asdf-vm. seriously.
I like that statement of cargo.
It learnes from npm, yarn, etc. Improve on the good ones and optimize the bad ones.
It's note veet, its vyte. It's not Linux, it's leenoox.
Why is nobody rewriting typescript (tsserver, tsc) itself to rust .. ?
JS is also slow due to how it uses memory, not only that it uses a GC it allocates lots of tiny objects all the time instead of having structs or larger entities it can always collect as a complete unit. Programs with lots of allocations are in my experience from debugging and profiling them a lot in production horribly inefficient in how they use memory with large number of objects. It also doesn't help that the still prevailing trend of JS projects using hundreds or some times even thousands of npm dependencies which bloats the whole build and run process a lot.
Honestly, I think the main reason is clout.
I love rspress.
I have realized watching channels like this is actually procrastination against learning Rust seriously. no. more.
It's true that you can write performant code in any language or dogshit code in any language. But it is also true that the language pushes you in one direction or another via the path of least resistance. For example, JS tends to result in code that creates lots of garbage which can be a performance issue on memory constrained devices. Not creating garbage in JS is hard to do, you have to fight against the language to do that.
Give me the short answer here please
CLI Rust tools make sense, but big fat no to Prisma. I'm not willing to take the cold-boot time hit on serverless. Multi-second cold-boot times are a deal-breaker. Honestly, I'm looking at making a monolith. Today with the new hyper-fast CPUs, it makes more sense for you to target a 128-core server with 2TB RAM and some nVidia H100 GPUs. You should probably just use a dyndns at first and server your website from home until you hit 1000 active month users. Chances are you'll never max it out, but if you do then you can just scale by doubling and you probably will save 4-10 $million. C++ for the win!
Yeah, why are we switching) BTW Thanks for twiggy!