Тёмный

Why is the JavaScript ecosystem switching to Rust? 

chris biscardi
Подписаться 30 тыс.
Просмотров 131 тыс.
50% 1

turbopack, parcel, rspack, vite, and even tailwind are all using Rust! but these are all tools for and by javascript developers. So what's going on?
ViteConf slides: / 1709943106215530867

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 184   
@WillDelish
@WillDelish 11 месяцев назад
I’m using mostly typescript & python for now, hoping to jump into more rust in the next year. Internal support at my work is growing!
@haliszekeriyaozkok4851
@haliszekeriyaozkok4851 Год назад
i'm writing my current SaaS project with rust completely, because it's fast, it consumes very low memory, when the code compiles that means your code will work %99 of the cases except database actions, and error messages so well explained and explicit. Because of that rust is the best choice for me, i'm already scaled my project with only writing it with rust and i'll be able to deploy it so easily.
@voidwalker7774
@voidwalker7774 Год назад
Wait you are not using SQLX, which tests your SQL statements at compile time?
@haliszekeriyaozkok4851
@haliszekeriyaozkok4851 Год назад
@@voidwalker7774 no, i'm using tokio-postgres and deadpool-postgres packages.
@theintjengineer
@theintjengineer Год назад
@@voidwalker7774, is this better than what he said he's using [tokio-postgres and deadpool-postgres]? Or is it only better if you're using tokio, because then they already _match_ ? I mean, at least from a *DB System* PoV, Postgres SQL > MySQL🤔 Thanks.
@voidwalker7774
@voidwalker7774 Год назад
@@theintjengineer SQLX, gives pooling and a unified frontend for MariaDB, Postgres and SQLite. You write Raw SQL. And you have the option to check your SQL at compiletime against the DB you selected. Just look at the crate :)
@haliszekeriyaozkok4851
@haliszekeriyaozkok4851 Год назад
​@himanshusharma6713 firstly, i don't use rust for small scale projects unless i don't need best performance, for basic things node.js has good performance. I choose rust because i do some cpu and memory intensive things. Second, when your code compiles that means your code is debugged, that means you don't need debugging. Updating could be hard but everything comes with costs. Rust is relatively new language and most of the tools are not hit to the 1.0, even most of my dependencies are like that, i still use it because i trust the maturity of the ecosystem, but most of the companies not. Because of that companies don't want to take that risk. It was also like that for C++, in 2000's still most of the cpu and memory intensive things was done with C, because C++ don't evaluated as mature enough to write that kinda things, so also rust faces that problem. And for other languages that you wrote i could say that things: C# - C# is an outdated language by most of the ways. Even most of the C# developers don't use newest .net and c# versions, and it's only slightly faster than modern php(even .net fanatics don't admit it), and far more memory consuming. It was semi successfull substituon of java in it's prime times but it's completely unsuccessfull in this time. But .net somehow achieve to be de facto official computer science education language, so every computer or software science student learning it, because of that it's achieved to live for 10 years. And because of that they become very comfortable that language they don't try new language for serious things. Go - Go is very fast and less memory consuming and also easy to write language. If i wouldn't decide to write my whole system with rust i definitely choose go with no doubt. Although i still could be able to deploy go apps, rust's "if its compiles it will work!" rule seduces and encourages me to do that choice, also go has more latency than rust, which in high traffic circumstances makes it significantly slower than rust. Mern Stack - The actual most hyped thing is react i suppose. It has most silly, most idiotish rules, one of them is: "you can not call a hook conditionally". This is most dumb thing, because in programming doing something conditionally is trivial. Because of that state changing and page changing without sending new http request is charming people. If they don't need good performance or they don't care about performance and they started coding by front-end development, people choose the go with that. And for your last opinions: I hate C# most, because the slowest and high memory consuming softwares which i used built with it and most of the slowness of our internet is because of firstly php, later c#. Also it's a product of windows, which is the probably most dangerous and harmful company in whole software world, it's always a reason of avoidance for me if a software built by microsoft, because of that i also hate typescript. I could understand why you're hate rust, because it's synthax is very hard to get familiar but with the help of ai you could write and debug rust codes easy if you're not a newbie developer. For me, Javascript, Go And Rust is ultimate stack for everything and if there is rust i don't think i use go for anything.
@kentbowling7513
@kentbowling7513 Год назад
Very good "Borrowing" section and metaphor usage in it. 👍
@HadiAriakia
@HadiAriakia 11 месяцев назад
This was good, mate. Good job, really good job I really enjoyed watching it and learnt a lot. Hard to find video that respect people time like this one
@NickyTheRook
@NickyTheRook 11 месяцев назад
This video is amazing, superb job. And yay, that WASM future I hoped for a few years ago where you can use WASM in your JS and not even notice is here!
@phoenix-tt
@phoenix-tt 11 месяцев назад
I am working on a Vue compiler in Rust as a side project, so far it's been a great journey. I would hope that when it's production ready, more tools from the Vue ecosystem would switch to the "native side".
@rustavellyne
@rustavellyne 6 месяцев назад
Can you advise what I need to know to also understand that I need to write my compiler for Vue
@Infernal_toast
@Infernal_toast Год назад
I rewrote my nodejs bot (vibegraph) to rust and it is 4x easier to read, more performant, and less prone to weird bugs. that is why rust is what typescript WISHES it could be
@FrankJonen
@FrankJonen Год назад
@himanshusharma6713 Rust is harder than Go. You can get results in Go from 0 to end of the week. That's why companies adopted it so quickly.
@aziskgarion378
@aziskgarion378 Год назад
@himanshusharma6713 Company immediately rushed to PHP, Ruby, OCaml, Java and C# back in the early days. Companies won't bother to migrate Legacy software either. Companies are stupid.
@nirjalpaudel
@nirjalpaudel Год назад
Rust is what cpp wants to be not just typescript 😉
@ZephrymWOW
@ZephrymWOW Год назад
Now use it on a project where 2500+ devs are using it. Rust is what hobbyists WISHES web development is like and will always be an everchanging "toy". Typescript solves REAL problems NOW.
@montebouwer4343
@montebouwer4343 11 месяцев назад
@@ZephrymWOW It is (in my opinion) unfathomable to think that 2500+ devs could manage type-consistency on a project in a language that is not strongly typed (meaning a first-class type system, with no Any-types) In my experience, as a project grows, (correct) types become increasingly more important.
@morgomi
@morgomi Год назад
superb video! 🙂🦀 very insightful!
@chrisbiscardi
@chrisbiscardi Год назад
Glad you enjoyed it!
@neociber24
@neociber24 Год назад
Blazing fast and Rust go hand to hand, I like the meme and should continue
@ayangd1436
@ayangd1436 Год назад
Just like how Python libraries are in C++.
@MrRaitiz
@MrRaitiz Год назад
and just like php extensions are written in C
@ubitubee
@ubitubee Год назад
Just like markdown is written in html
@Gramini
@Gramini 11 месяцев назад
That depends on the library. "Python" libs can also be written in C or Rust.
@Gramini
@Gramini 11 месяцев назад
@@MrRaitiz There's "ext-php-rs", which lets you build PHP extensions in Rust.
@ayangd1436
@ayangd1436 11 месяцев назад
@@Gramini Yes. Can also be written in assembly.
@xavierhernandez8245
@xavierhernandez8245 9 месяцев назад
This is brillant content. I'm TS dev starting with Rust. I really really enjoyed it. Thanks! 👍
@sekus
@sekus 11 месяцев назад
Great breakdown and summary of common Rust concept in the master half of the video. I will have to revisit this section a few times
@AceofSpades5757
@AceofSpades5757 11 месяцев назад
Blazingly fast is great when it's blazingly fast. Too many projects feel slow and bloated. Some blazingly fast here and there, and over there too, is a welcome change.
@3dwebdev
@3dwebdev 5 месяцев назад
heck good video bro. You do a great job of providing high level detail so a beginner developer can understand.
@indramal
@indramal 11 месяцев назад
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
@dwaitwhatthatis...impossib8450
@dwaitwhatthatis...impossib8450 11 месяцев назад
got bored at 7m eh?
@b1chler
@b1chler 11 месяцев назад
Thanks for the awesome video! They r getting better and better. 👌
@macaco_agiota
@macaco_agiota Год назад
Really awesome content!!
@judevector
@judevector 10 месяцев назад
I came from a Python background then added JavaScript because everything on the web has JavaScript in it recently i started learning Rust and am glad i did, i started learning Rust because of Solana Blockchain and coming now seeing that i can do more outside Solana too . Am glad i took this part
@maygodguideustohaven
@maygodguideustohaven 9 месяцев назад
same here i didnt expect i would like rust untill i tried it
@Ch0rr1s
@Ch0rr1s 11 месяцев назад
45:00 - I'm fairly new to rust but a decade in the industry. i got myself a somewhat working view on how to work with ownership model. However, you explanation with the dog was so good, it really just clicked now. really good setup there. thanks for your work. man i really have to use rust more.
@fandiilham6906
@fandiilham6906 10 месяцев назад
That is true, and i take screenshoot at that part
@digitalspecter
@digitalspecter 9 месяцев назад
Always nice to see a fellow Nushell user =)
@snippletrap
@snippletrap 8 месяцев назад
Before now, if you wanted C-like speed then you had to write in C or C++. Now you can write at a high level of abstraction with friendly syntax and still get all the performance benefits of a low-level compiled language. Why not do an easy re-write and get a 30x+ speed boost? It's a no-brainer.
@storm14k
@storm14k 11 месяцев назад
Been wanting to like Rust for years now. I thought after some time to mature I'd come back and find it pleasant as I did with Go. But I come back and it keeps managing to piss me off. Maybe I need to go and look at some services written in Rust to see if I'm overcomplicating things.
@lagseeing8341
@lagseeing8341 10 месяцев назад
if by pleasant you mean simplicity then you are wasting your time looking into rust.
@ob34915
@ob34915 8 месяцев назад
90% of the projects are using Webpack its very hard to migrate and no one want to use an other bundler specially in the entreprise env
@tabletopjam4894
@tabletopjam4894 Год назад
the reason I personally did not stay on js was limitations and speed, its been 7 years though
@a_maxed_out_handle_of_30_chars
@a_maxed_out_handle_of_30_chars 11 месяцев назад
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 :)
@autohmae
@autohmae 10 месяцев назад
You know what's interesting,... when you think about it... both JS and Rust came from Netscape/Mozilla.
@MarkTheSWE
@MarkTheSWE Год назад
Nice job Chris!
@antondovydaitis2261
@antondovydaitis2261 6 месяцев назад
My favorite error message ever is from LISP: UNHAPPY MAKNAM ERROR. It happened when an attempt to make a new symbol or name failed for some reason, usually because you ran out of naming space. It also made an appearance in a Firesign Theatre sketch titled "Don't Crush That Dwarf, Hand Me My Pliers," when an amusement park attendee intentionally breaks the animatronic President.
@rallealyt
@rallealyt 11 месяцев назад
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.
@StevenAkinyemi
@StevenAkinyemi 11 месяцев назад
Not stable enough in what sense?
@ArneBab
@ArneBab 11 месяцев назад
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 …
@limpep
@limpep 11 месяцев назад
The problem is Rust is still a new language and the job market for it is basically non-existing
@lutfiikbalmajid
@lutfiikbalmajid 8 месяцев назад
I'm in half migrating my Fastify backend to rust. So far so good. Happy with the results and more faster
@lucast2212
@lucast2212 11 месяцев назад
One thing I would like to add is that for the same reasons that rust works well with rust-analyzer (strong typing, no syntactic flutter), it also works very well with code generating AIs. It is quite pleasing to have an AI generate an entire function for you that is just the way you wanted it to be.
@workflowinmind
@workflowinmind 11 месяцев назад
Not my experience, it's good for completion but makes tons of subtle mistakes otherwise in a Rust context
@thegoldenatlas753
@thegoldenatlas753 8 месяцев назад
​@@workflowinmind depends on the AI, copilot works amazing especially with workspace access while chatgpt just barely scrapes by I literally typed "i" once and copilot made nearly a perfect generation of the if statement i wanted and only thing i needed to change was a integer it used.
@ameknite
@ameknite 11 месяцев назад
Clap, this could be a great talk in a conference
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
It was 👀
@yoanhg421
@yoanhg421 7 месяцев назад
Pretty soon Rust will run on the web and we’ll have videos with title like “Python or Rust. What to choose as your first programming language”
@raul834
@raul834 11 месяцев назад
If just all these projects could agree on developing ONE packager, bundler, … it seems that every two days somebody creates a new one. It is such a waste of energy and fragments the ecosystem. These fragmentation makes web development a nightmare. Gulp, Grunt, Webpack, Vite, Parcel, Rollup, … and now all these other newcomers. I am all-in for choice, but this is just crazy.
@gearboxworks
@gearboxworks 11 месяцев назад
Not really a JS developer - I spend my days coding in Go lately - but still watched this anyway. I gotta say, the second half explained things to me I have previously never had anyone explain and now I feel like I better understand how at least some of Rust's unique features work. So thanks for that! One thing that was unclear to me about the first half though is the embedding of Rust in JS. Are you saying that you can embed Rust in JS in the *browser*, or is Rust embedding really just a server-side NodeJS thing?
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
Glad you found it useful! You can embed Rust in the browser or in node. In the browser this is going to be by using wasm, which can be interacted with directly by javascript, and in node this can be either through the native extensions (napi) or through wasm, both work.
@gearboxworks
@gearboxworks 11 месяцев назад
@@chrisbiscardi ​ - Thanks for the quick response. When I was asking about embedding in the browser I was asking specifically about native since you made it clear the distinction between native and Wasm, and it was clear that generating Wasm was a strong feature of Rust, which obviously works in the browser. So for clarity on this point my takeaway is that “No, you cannot embed Rust natively in the browser, but you can embed it natively on the server with Node” which I post in case someone else has the same question in the future.
@bartek...
@bartek... Год назад
Just found you channel. Great vid!!! Later I'll check your other stuff.
@rindtier7287
@rindtier7287 11 месяцев назад
I feel so old and slow... now again learning something new?? Or better changing to project management ...
@alexichepura
@alexichepura 11 месяцев назад
Yeah, why are we switching) BTW Thanks for twiggy!
@tontj
@tontj 11 месяцев назад
I like that statement of cargo. It learnes from npm, yarn, etc. Improve on the good ones and optimize the bad ones.
@Xwth
@Xwth 11 месяцев назад
Your pet the dog borrow checker example made it very easy to understand, cleared up many of my doubts. Thank you!
@sqeaky8190
@sqeaky8190 8 месяцев назад
You sound levels are not consistent between videos (I came from the rewriting in rust video which was much louder). Consider adding a step to your process where you check or nomalize your levels. Thanks for documenting these technically items.
@haliszekeriyaozkok4851
@haliszekeriyaozkok4851 11 месяцев назад
in 31:12 actually in rust const keyword exist, which you can use it for defining a variable outside to the any function(including main function).
@Gramini
@Gramini 11 месяцев назад
Keep in mind though that such constant has to be constant at compile time. You cannot ask for user input and store than in a const or something.
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
This is true, however the const keyword is not a variable declaration. Its important to know that const refers to creating an item that is evaluated at compile time, and its usage in the compiler is such that the computer value will be inlined wherever it is used. Its like a compile-time find-and-replace for the name of the const using the computed value. Similarly the static keyword exists which is closer to a variable, but IMO mentioning either of these isn't really what people think of when they think of every day use variables. Rust heavily discourages the use of global state and accessing static mut items requires unsafe Rust which I consider out of scope for this introductory level video.
@RussellD
@RussellD 11 месяцев назад
this was an excellent intro to rust. thank you
@lagcisco
@lagcisco 11 месяцев назад
Such a stud, excellent as always
@christianm4906
@christianm4906 11 месяцев назад
Recently, JavaScript has been receiving a lot of optimisation. However, I agree that it's a poor language from a software engineering perspective. The issue with Rust is that it's too new and thus lacks the libraries available in C and C++. If I ever wanted to learn a new language, it would likely be Golang; for now, I'll stick with my projects in C++, Python, and JavaScript.
@SXsoft99
@SXsoft99 10 месяцев назад
you know you can import the libs from c++
@looming_
@looming_ 10 месяцев назад
Can you explain how it’s a poor language from software engineering perspective?
@FandangoJepZ
@FandangoJepZ 10 месяцев назад
Go doesn’t even have the most common math operators for integers
@christianm4906
@christianm4906 9 месяцев назад
@@ITSecNEO ​ Hi, I hadn't replied because I actually have a life. Today, the first of January, I've got some time to procrastinate, so let me give you an answer. First of all, programming languages aren't a religion. They are just tools, like a hammer. Falling in love with a programming language is like falling in love with a hammer. Now, my comment was a bit taken out of context. I am not saying that Rust is wrong. I am just stating a fact: it lacks the overwhelming amount of libraries that you would find in C and C++ ecosystems, and I know that some Rust lovers might struggle to admit that fact. I am also aware that Rust can somehow import 'extern' C/C++ code. Actually, there is nothing innovative with that approach. Almost every programming language that I know can do the same thing and probably in better ways. Java with the Java Native Interface (JNI), Python with PyBind11/Shiboken/SIP/Boost::Python, JavaScript with Node native modules, and so on. The list also includes those languages that are self-proclaimed C++ killers but have miserably failed to replace C or C++ in the same way Dart failed to replace JavaScript. The problem with Rust integrating with other languages like C++ is that the two programming languages are fundamentally incompatible. I am not a Rust expert, but just to give you an example, many GUI libraries generally rely on OOP patterns such as inheritance, which allows extending functionalities in a more streamlined way. However, Rust doesn't even support inheritance, which closes the door to many design patterns that heavily rely on that OOP feature. Yes, I know there are traits in Rust, but they are not the same, and achieving the same flexibility might be more painful. Yes, I know composition is generally better than inheritance, but that is a different conversation. In fact, I am not saying that C++ is better than Rust as a programming language. It is very likely that Rust is better in many aspects, just as Dart is better than JavaScript. However, that is a different conversation. My point is that replacing a programming language such as C and C++ by using an incompatible programming language imposes too many challenges that could make it just another failure in that respect. There is a lot of code written in C and C++ that cannot be easily replaced by an incompatible programming language, no matter how good or better it is supposed to be. The industry has infallibly proven that that approach is more likely to fail. Instead, I see other approaches more likely to succeed in replacing C++. We can see examples of this in the industry. For example, TypeScript is a very good example of how you can migrate code from JavaScript to another programming language while maintaining compatibility. You just change the extension of a file from .js to .ts, and you start seeing results right away. This is also why C++ is a very successful language in terms of adoption. Because it was compatible with C right away, you just compile a C program with a C++ compiler, and you start seeing progress in code migration. I believe more in those approaches. This means that languages such as Carbon and CPP2 might have better chances to succeed than Rust if the first production-ready version of those languages gets released. However, it has been about 12 years since we first heard of Rust, and in 2024, it is still more like a niche programming language, and honestly, it hasn't yet replaced C and C++. In any case, I will be open to migrating code to Rust if I ever see that it offers as much or more than the C and C++ ecosystems offer today. More importantly, however, I will consider migration if I can achieve transparent integration of my code without having to contend with the pitfalls associated with the 'extern-function approach'. Regarding Golang, I like that it has a lot of support for cloud services while being relatively easy to learn and use in concurrency contexts. It also provides a descent performance. However, I will not give it a chance unless I have a compelling reason to use it. In the end, it is just another tool.
@mistdoyhta696
@mistdoyhta696 8 месяцев назад
bro really coding in C++ 💀
@lenninlc
@lenninlc Год назад
Fantastic video 👏🦀
@杨兴元
@杨兴元 11 месяцев назад
I love rspress.
@workflowinmind
@workflowinmind 11 месяцев назад
Amazing overview
@jafarjuneidi7585
@jafarjuneidi7585 11 месяцев назад
I was wondering if I maybe should move away from Rust because of the bad news/decisions about the organization. Could they possibly change Rust in a bad way and push people away from it?
@jonforhan9196
@jonforhan9196 11 месяцев назад
why would that matter? only twitter people care about that stuff. rust has trade-offs good and bad and that's really all that matters to people who aren't weirdos
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
I don't know which news you're referring to specifically but speaking generally: IMO you won't get away from having people in charge of the development of a language anywhere you end up. Whether its a BDFL or a foundation or a spec group or implementors (browsers, compilers, runtimes) or something else, there's always someone at the end of the day that can make decisions you don't agree with. Rust is a great language but it is also not the last language and its problems are not unique
@alec-c4
@alec-c4 8 месяцев назад
What 'bout bun, powered by zig?
@EngineerNick
@EngineerNick Год назад
any minute now there will be a new language that "compiles to vanilla rust!"
@EngineerNick
@EngineerNick Год назад
and maybe that would be great actually, because procedural macros are not great last time I tried to write one.
@chrisbiscardi
@chrisbiscardi Год назад
Macros are definitely tough to write compared to everyday Rust. Luckily it seems like there was a macros working group (very) recently approved to work on this. It'll still be awhile before there's anything to show for it but it's a thing now: github.com/rust-lang/wg-macros
@にはおさおあ
@にはおさおあ 7 месяцев назад
People start to build everything with vite now though..
@yuryzhuravlev2312
@yuryzhuravlev2312 11 месяцев назад
never used WebPack, I used rollup before and now vite.
@gorudonu
@gorudonu Год назад
I would love to use rust, but as mobile dev it lacks easy setup even to configure it as bindings. as for web, I'd love to see something like Rails for Ruby but for Rust
@blenderpanzi
@blenderpanzi 11 месяцев назад
What do you think about the existing web frameworks? I only used actix-web for a single endpoint hello world server with custom error handler yesterday. Yes, rails is simpler, but I can't judge it just from that tiny experiment.
@gorudonu
@gorudonu 11 месяцев назад
@@blenderpanzi I checked actix-web, rocket and looked a little bit at axum - they are very similar to each other but they're more like micro frameworks - think express for javascript or flask for python. In my opinion, rust should have something like rails or laravel - generator for project, sqlx configured out of the box, cli program to generate scaffolding, configuration in place for web templates, api + plugins for authorization. In that way you can startup your project in few seconds when currently you spend whole evening just to configure project structure and connection to database.
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 11 месяцев назад
uniffy?
@gorudonu
@gorudonu 11 месяцев назад
​@@climatechangedoesntbargain9140you mean uniffi ? Yes it does exist. Still I cannot say it's easy to set up a new project with it. Compare it to something like creating a project with react native or flutter or even creating native project
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 11 месяцев назад
@@gorudonu sorry, uniffi indeed
@ArmandoDoval
@ArmandoDoval 10 месяцев назад
"You can do nothing in any language" is true only up to a point. Lots of languages don't adhere to the idea of zero-cost abstractions so you're stuck choosing between ergonomics and efficiency. E.g. Every user-defined type in Java is a pointer to an object on the heap, which makes it impossible to have zero-cost newtypes in general, and especially numeric newtypes.
@pleggli
@pleggli 11 месяцев назад
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.
@Kabodanki
@Kabodanki 11 месяцев назад
we have a very long long long way to go
@lutfiikbalmajid
@lutfiikbalmajid 8 месяцев назад
Dont believe with next turbo, its unstable, i oftenly got my app crash in dev mode. And not compatible with all library
@thanatosor
@thanatosor 11 месяцев назад
Perhaps one day, ppl will write Rust instead of JS. When every libraries we need are re-written in Rust. Then it doesnt matter.
@thanatosor
@thanatosor 11 месяцев назад
@no1youknowz could be fine too. Indeed I intend to write transpiler to take use of Rust advanced compiler/analyzer.
@nordicnomad5473
@nordicnomad5473 11 месяцев назад
Expecting a full featured DOM API written in Rust in built with web browser 😊 Hope we can write frontend browser apps with Rust soon 😊
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
It's possible to do this today with crates like Yew and Leptos. We don't need to wait for a wasm dom api, although it would be nice to have that api.
@monawwarabdullah7438
@monawwarabdullah7438 10 месяцев назад
@@chrisbiscardi then why aren’t we doing it? what’s blocking?
@chrisbiscardi
@chrisbiscardi 10 месяцев назад
@@monawwarabdullah7438 not sure what you mean. I'm already doing it and there's nothing blocking me from doing it.
@CaleMcCollough
@CaleMcCollough 11 месяцев назад
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!
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
Rust is not the cause of Prisma's effect on cold boot times. Rust boot times in serverless environments are some of the lowest I've seen for any language.
@perc-ai
@perc-ai 11 месяцев назад
js that compiles to rust is the future
@RomanTchekashov
@RomanTchekashov 11 месяцев назад
We should not misunderstood that Rust used for tools which general developers use to create web apps in JavaScript. Rust is very difficult language. People cannot write good code even in JavaScript which more easier to grasp.
@kiyov09
@kiyov09 11 месяцев назад
Very good video 👏
@antarcticmonkeys
@antarcticmonkeys 11 месяцев назад
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.
@aubreyzulu
@aubreyzulu 11 месяцев назад
Subscribed because you are using a light theme 😂
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
haha, unfortunately you're going to be disappointed in the next video; I'm mostly a dark mode user 😅. I gave this video as a presentation recently in-person which I find works much better with light-mode themes, which is why everything here is light-mode.
@thanatosor
@thanatosor 11 месяцев назад
Imagine ending the war between nodeJS & JS by simply using Rust & napi-rs
@TheEvertw
@TheEvertw 8 месяцев назад
I also love the Rust testing framework. To such an extent that I have recreated something similar in Python to test my Py code. Was very simple as well.
@hagaiak
@hagaiak 8 месяцев назад
One correction: It's only possible to write programs that realize their full performance potential on C, C++, or Rust (and some other languages that are not popular enough to warrant a mention). Other languages are not zero-overhead.
@adicide9070
@adicide9070 11 месяцев назад
I have realized watching channels like this is actually procrastination against learning Rust seriously. no. more.
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
Sounds like it's time for you to pick a project to work on.
11 месяцев назад
Why is nobody rewriting typescript (tsserver, tsc) itself to rust .. ?
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
The answer is mostly social/funding IMO. You could totally build tsc and the typechecking in another language, but what typescript "is" is defined entirely by what's in the microsoft/TypeScript repo and how that code works. So *if* you pursued this project, you would take on the burden of effectively tracking every PR into that repo in addition to building a whole second implementation of the compiler and typechecker. The TS src/ directory is conservatively estimated at 300k lines of TS (I used tokei to count). This is fundamentally a lot of work to replicate in addition to there being very valid reasons to build a language's compiler in its own language so its unlikely that the microsoft/TypeScript repo switches away from TS. This is actually where I would prefer to see the effort happen as it has the most chance of success IMO. The most common approach is to not replicate the typechecking at all and instead just try to build the compiler. This is what swc does: swc.rs/docs/migrating-from-tsc That all said, there actually *are* attempts to write a TS typechecker in Rust. At least two that I know of. enzo and stc. Enzo explicitly declares that they aren't chasing 1:1 parity with TSC, while I *believe* stc is still trying to, but stc is very early in its lifecycle. Enzo is also mentioned as being part of oxc, which is the tooling vite/rolldown are going to use. * enzo: github.com/kaleidawave/ezno * stc: github.com/dudykr/stc * github.com/web-infra-dev/oxc * oxc/ezno: github.com/web-infra-dev/oxc#-ezno-type-checker
11 месяцев назад
@@chrisbiscardi I get it.. But lets take esbuild - (as I understand) they are just trimming typscript out, leaving plain JS. And if you want typechecking - well - they say - check yourself.. This just feels like a hot patch, which on the surface works fast, but actually doesn't do what I would want it to do, and doesn't entirely resolve the issue. I might be wrong.
@patchshorts
@patchshorts 11 месяцев назад
It's note veet, its vyte. It's not Linux, it's leenoox.
@digitalspecter
@digitalspecter 9 месяцев назад
Um, I didn't go look if Vite has made any statements about it but I'd assume Vite comes from French (fast, quick) and then his pronunciation is in the ballpark.
@igorskyflyer
@igorskyflyer 11 месяцев назад
206cm?! 😮
@Sammysapphira
@Sammysapphira 11 месяцев назад
I would be really happy if we slowly transitioned to rust for general web development. I've always wanted to get more experience with a low level language, but can never really afford the time to since all of my work pertains to javascript/typescript tooling
@etarleytaverastaveras9849
@etarleytaverastaveras9849 9 месяцев назад
So you are 2 meters tall 🤨
@MattHudsonAtx
@MattHudsonAtx 11 месяцев назад
Parallelism is great and all but concurrency is where it's at
@Necessarius
@Necessarius 11 месяцев назад
Give me the short answer here please
@someman7
@someman7 11 месяцев назад
Why are you so reluctant to say Rust is fast? The same algorithm implemented runs much faster when written in rust and compiled than written in javascript and interpreted, right?
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
The first thing I would say is that JavaScript is also compiled these days. Chrome, for example, has a multi-stage compiler process including an optimizing compiler for turning JavaScript into machine code (ex TurboFan: v8.dev/docs/turbofan). Yes, Rust has a strong focus on being able to achieve performance using various knobs. The focus on zero-cost abstractions helps a lot here to be able to use high-level language constructs without paying a runtime cost. But at the end of the day there is more to performance than "use X language". IMO unless you're benchmarking your use case any statement along the lines of "X is faster than Y" is mostly theoretical, and applying that at the language level is even more fraught. For example, even if Rust is faster for a given algorithm as you suggested, is the overhead expended calling it across the FFI boundary worth it?
@someman7
@someman7 11 месяцев назад
@@chrisbiscardi I wasn't thinking about using Rust to develop web front-ends, but libraries and CLI tools, where there is no overhead to crossing the boundary. That being said, I really wish we'd get rid of JS' monopoly on the FE. If only wasm didn't seem opposed to the idea.
@palgun.
@palgun. Год назад
Zig and bun 😏
@gmxmatei
@gmxmatei 11 месяцев назад
OK!
@bryson2662
@bryson2662 11 месяцев назад
206cm!?
@knolljo
@knolljo Год назад
206, odd flex ;)
@RussellD
@RussellD 11 месяцев назад
replace rustup, nvm, volta, n, fnm all with asdf-vm. seriously.
@goo2581
@goo2581 11 месяцев назад
so, I should just learn rust, right?
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
If you have the time and energy to learn it, its a great language to know, but without knowing what kinds of programs you write, etc I can't make any blanket suggestions.
@goo2581
@goo2581 11 месяцев назад
@@chrisbiscardi well I do frontend, currently angular, but I’ve been wanting to get more into backend and I was searching for a good language, although I know it doesn’t matter that much. I’ve hear a lot about rust, and mostly hear good things, so I might just jump into it
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
@@goo2581 yeah, choice of language won't matter too much when just getting started building small web APIs and such, you could use JS for that too. Rust can definitely be a great backend language to add to your toolbox. Axum in particular has a wonderful set of examples that can help as you're learning: github.com/tokio-rs/axum/tree/8854e660e9ab07404e5bb8e30b92311d3848de05/examples
@goo2581
@goo2581 11 месяцев назад
@@chrisbiscardi yeah, I’ll check it out, note that I’m not new to backend, I used to work with C# and I’ll start to work again, for work-related purposes, but I want to make some personal projects with something new and better
@chrisbiscardi
@chrisbiscardi 11 месяцев назад
@@goo2581 oh yeah, then you'll do fine. It'll just take a bit of time to get used to the language and whatnot.
@brielov
@brielov Год назад
I don't know why but I would love a javascript runtime written in rust.
@chrisbiscardi
@chrisbiscardi Год назад
There are some. Deno is the most well known and viable one. It still uses v8 under the hood though, just like node (bun uses JavaScriptCore). Building a competing JavaScript *engine* (like v8/jsc) is something nobody is doing afaik.
@brielov
@brielov Год назад
Yeah I use Deno wherever I can 'cause of its toolchain (lsp, formatter, etc) since I use helix and it is just simpler and more performant. But I actually meant I would love a javascript engine, not wrappers around v8 or javascriptcore like bun.
@chrisbiscardi
@chrisbiscardi Год назад
@brielov it's a tough project so I see why it hasn't been taken on. v8 is a million lines of code iirc and at the end of all that work you still end up with a JavaScript engine, which v8 already is. Even Servo, which I consider a wildly ambitious project, uses Rust bindings to spidermonkey for the JS engine afaik.
@arexon
@arexon 11 месяцев назад
@@brielov There's an engine called Boa, but it's still very much new and doesn't support the entire ECMA specification yet and also lacks important performance optimizations. It might be possible to build a runtime around it once it matures though
@newtonchutney
@newtonchutney 11 месяцев назад
45:16 nah bruv, the dog after it got adopted, got out of scope, got dropped and it ceased to exist.. it was killed 🥲
@marcusrehn6915
@marcusrehn6915 11 месяцев назад
Honestly, I think the main reason is clout.
@dira4734
@dira4734 8 месяцев назад
206 cm LUL
Далее
Rust Demystified 🪄 Simplifying The Toughest Parts
14:05
I spent six months rewriting everything in Rust
15:11
Просмотров 431 тыс.
У КОТЯТ ОТКРЫЛИСЬ ГЛАЗКИ#cat
00:26
The First Real Webpack Alternative (Written in Rust!)
19:28
Rust Data Modelling Without Classes
11:25
Просмотров 174 тыс.
The Truth about Rust/WebAssembly Performance
29:47
Просмотров 182 тыс.
Use Arc Instead of Vec
15:21
Просмотров 147 тыс.
What Makes Rust Different?
12:38
Просмотров 203 тыс.
why rust libraries may never exist.
7:26
Просмотров 259 тыс.
Async Rust Is A Bad Language | Prime Reacts
28:46
Просмотров 98 тыс.
How principled coders outperform the competition
11:11
How Senior Programmers ACTUALLY Write Code
13:37
Просмотров 1,5 млн