Build a JS Runtime in Rust

  Рет қаралды 22,987

Deno

Deno

Ай бұрын

Build your own JavaScript runtime with Rust.
Read along here: deno.com/blog/roll-your-own-j...
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
Website: deno.land
GitHub: github.com/denoland
Discord: / discord
Twitter: / deno_land

Пікірлер: 66
@ashishkumawat6110
@ashishkumawat6110 28 күн бұрын
"Let's build a runtime" proceeds to install prebuilt runtime libraries 😶
@wlockuz4467
@wlockuz4467 Ай бұрын
Yo dawg, I heard you like building frameworks, so we put a framework inside a framework so you can build a framework while you use a framework.
@SRG-Learn-Code
@SRG-Learn-Code Ай бұрын
Wait.. Awesome? What are you doing here?
@ChichaGad
@ChichaGad Ай бұрын
Just wrapping wrappers with wrappers lmao
@dinoscheidt
@dinoscheidt Ай бұрын
😂
@awesome-coding
@awesome-coding Ай бұрын
👋👋👋
@anyadatzaklatszjutub
@anyadatzaklatszjutub 26 күн бұрын
@@awesome-coding❤
@jearsh
@jearsh Ай бұрын
is this a runtime, or is it a rust program using deno as a runtime?
@tryoxiss
@tryoxiss Ай бұрын
A runtime created where the engine is a binding to V8 and the event loop is a binding to Deno. So its less of a runtime and more just glue, but whats what most devs write anyway.
@thejoycode
@thejoycode Ай бұрын
It uses deno as a runtime, and then builds a wrapper around it using rust... So it's a runtime built on a runtime + rust. So it's just deno with extra steps
@markoffden
@markoffden Ай бұрын
Imagine showing this to doctors while they kindly accompany you to your ward nodding “yes, sure mate, a-ha”
@kakashi_69_xd
@kakashi_69_xd Ай бұрын
Awesome.. waiting for the series
@duckmasterflex
@duckmasterflex Ай бұрын
The new running joke is "you have a working library in Javascript? lets write it in rust"
@ricko13
@ricko13 21 күн бұрын
This is the kind of videos I watch when I have the need to procrastinate 😴
@mike110111
@mike110111 Ай бұрын
This is so great! Thank you
@programmersoham
@programmersoham Ай бұрын
let's dig into it
@justy1337
@justy1337 Ай бұрын
Music to my ears :)
@PaulPhilp-pe5oe
@PaulPhilp-pe5oe Ай бұрын
The voice is awesome!
@1001bit
@1001bit Ай бұрын
tho an indian accent
@xNiqueish
@xNiqueish Ай бұрын
@@1001bit I'd say scandinavian one
@silloi
@silloi 27 күн бұрын
Yes it gets quite better than those uploaded before
@heycherry100
@heycherry100 Ай бұрын
so awesome! more more more!
@ShravanSunder
@ShravanSunder 27 күн бұрын
Yea, more please!
@peterhayman
@peterhayman 28 күн бұрын
yes very interested!
@Ma1ne2
@Ma1ne2 26 күн бұрын
Well, this is COOL!
@narrei666
@narrei666 Ай бұрын
my first thoughts was whether ryan dahlis awesome or its just a deal
@rbdm
@rbdm Ай бұрын
If this series ever gets updated it might be interesting to see how to pass existing data from from Rust to JS and back
@krtirtho
@krtirtho Ай бұрын
Aghh.. now u have unlocked this new domain of writing infinite amount of runtimes to the JS community. Now, we've to suffer the consequences.
@Disorrder
@Disorrder 28 күн бұрын
Cool! But how about TS runtime?
@sayedulkrm
@sayedulkrm Ай бұрын
I need to watch this video after 10 years 😅 Right video wrong time
@pitust
@pitust Ай бұрын
Wouldn't a dedicated scripting engine be a better job for the task than a copy of V8? Especially since v8 is absolutely massive, and plugins are not the hot code path anyway (or they shouldn't be at least). IMO, an embeddable scripting language like starlark or even just a copy of QuickJS would work much better than v8 (and also it would not be a 50 megabyte codesize increase, which is also fun)
@AZisk
@AZisk Ай бұрын
Fireship too $$$$
@jeffreyjdesir
@jeffreyjdesir Ай бұрын
this seems insanely powerful...whatever it meant to be a pc developer probably applies even less now
@Imscottirl
@Imscottirl Ай бұрын
It’s not that big a deal. He’s just lifting deno.
@ncubica
@ncubica Ай бұрын
@@Imscottirl mmmm more than that it is containerizing deno, so technically if you were using something like Tauri you could have a embeded REPL as simple as this video?
@Imscottirl
@Imscottirl Ай бұрын
@@ncubica that’s fair, and a solid use case. I’ve embedded V8 directly, so I guess that’s why I’m a little meh. V8 integration will change your life. Almost zero docs, a 50mb library, and cryptic exceptions.
@mike110111
@mike110111 Ай бұрын
Hmm the core api has changed a lot since the blog post was written (July 2022) so the code doesn't work anymore!
@deno_land
@deno_land Ай бұрын
We should revisit our blog post and update it accordingly. Thanks for pointing that out.
@michiplays7142
@michiplays7142 Ай бұрын
Is there any reason to make your own runtime instead of using node or deno directly?
@ncubica
@ncubica Ай бұрын
REPL ? imagine running automate script that user can write, you can have them sandboxes on a deno instance? i mean you could use deno directly. I don't know I just trying to make a sense of this video lol...
@eineatombombe
@eineatombombe Ай бұрын
said in the beggining, it's to learn
@leeroyjenkins0
@leeroyjenkins0 Ай бұрын
​@@eineatombombeLearn what? Not to make a runtime, clearly. Since you're using one as a library
@leeroyjenkins0
@leeroyjenkins0 Ай бұрын
But indeed, there are some valid examples at the start for why you would want to do this. It allows you to interact with JavaScript directly from rust instead of having to spawn a process and communicate with it. Plugins/user scripts would be a common one, you can modify the context of the engine as it's running and get whatever values you'd like from it fairly easily.
@eineatombombe
@eineatombombe Ай бұрын
@@leeroyjenkins0 im not talking about what was done in the video. the question was `why make a runtime` not `why "make" a runtime by installing a few libraries`
@jagadeeshgade6309
@jagadeeshgade6309 Ай бұрын
@YordisPrieto
@YordisPrieto Ай бұрын
Oh no no no! What have you done ✅ Deno! What have you done! Freaking Pog
@MikeKasprzak
@MikeKasprzak Ай бұрын
Wow
@nanashi7726
@nanashi7726 Ай бұрын
1:26 This code does not work in the latest deno_core
@deno_land
@deno_land Ай бұрын
Thanks for pointing that out. We will update our content accordingly.
@abubalo
@abubalo Ай бұрын
This video was scheduled to be released on April 1, but, well, here we are
@friendlywavingrobot
@friendlywavingrobot 28 күн бұрын
Someone get React Server Components running now
@nm6x
@nm6x Ай бұрын
Please expand this subject… show us how would you add nom modules…
@Funcijej
@Funcijej Ай бұрын
Do you mean npm? Or is nom modules just something I haven’t heard of yet?
@nm6x
@nm6x Ай бұрын
@@Funcijej npm lol!
@vanvothe4817
@vanvothe4817 Ай бұрын
Wait...I hear fireship in here
@eineatombombe
@eineatombombe Ай бұрын
no this is awesome www.youtube.com/@awesome-coding
@rezwanahmedsami
@rezwanahmedsami Ай бұрын
He he lol
@taquanminhlong
@taquanminhlong Ай бұрын
Well, this still lacks setTimeout and other global declarations, on top of that, v8 rust API is not easy to use at all 😂
@MurderByProxy
@MurderByProxy Ай бұрын
do one in C
@anonymoussloth6687
@anonymoussloth6687 Ай бұрын
What's better? Deno or bun? I heard bun is faster
@SimonBuchanNz
@SimonBuchanNz Ай бұрын
Different projects with different goals. Bun is selling itself nearly entirely on being fast, while Deno is trying to do Node "right": Rust to make the embedding safe, an extensibility model like you saw here with ops and extensions to build the entire runtime API, so you can easily add or remove whatever features you want in your own version of the runtime, a new and better package registry, built in typescript, watch, tests and building (many of which got copied back into node), a new standard library.... It's trying to do way more things. Being fast is laudable, but if that was really your *only* goal, then really you shouldn't be using JavaScript. And there's been a few of misrepresentitive claims about just how fast Bun is, comparing nonequivalent actions etc.; you shouldn't actually expect noticable performance differences most of the time. That said, why not just try both? They're all fairly compatible.
@eineatombombe
@eineatombombe Ай бұрын
bun is faster, but doesn't support everything. and when you install a node package in bun, it will use node APIs so it won't be faster
@TRLYx
@TRLYx Ай бұрын
FIRST I AM THE COMMENT KING
"What to know about Deno 2.0"
25:55
Deno
Рет қаралды 12 М.
WinterJS -  A New Javascript Runtime
27:06
ThePrimeTime
Рет қаралды 177 М.
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 4,4 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 123 МЛН
PINK STEERING STEERING CAR
00:31
Levsob
Рет қаралды 21 МЛН
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 194 М.
Did I just make the fastest JavaScript runtime?
8:44
Nathan Baggs
Рет қаралды 11 М.
Writing a Compiler and Interpreter in Rust - Part 1
39:39
Rust Demystified 🪄 Simplifying The Toughest Parts
14:05
Code to the Moon
Рет қаралды 171 М.
Javascript return vs return await (Crucial Difference)
10:33
Angular University
Рет қаралды 2,1 М.
Why JavaScript Devs are Switching to Rust in 2024
10:35
warpdotdev
Рет қаралды 247 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 285 М.
Luca Casonato @DenoFest Tokyo: "The state of Fresh"
15:30
why rust libraries may never exist.
7:26
Low Level Learning
Рет қаралды 223 М.
Нашел еще 70+ нововведений в iOS 18!
11:04
Мечта Каждого Геймера
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,8 МЛН
Телефон в воде 🤯
0:28
FATA MORGANA
Рет қаралды 905 М.
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 2,5 МЛН
Bluetooth Desert Eagle
0:27
ts blur
Рет қаралды 8 МЛН