3 ms·
V8 is a library that gets embedded in some larger program. It doesn't determine how imports work or any API's, and if you don't have any API's to call, there's
by skybrian 3y ago
V8 is a library that gets embedded in some larger program. It doesn't determine how imports work or any API's, and if you don't have any API's to call, there's not much you can do in JavaScript.
A browser does all that, so that's the runtime. Similarly for Node's import resolution and its API's for doing I/O.
You could think of it as all the code in the 'deno' or 'node' command other than V8 itself.
- sfvisser 3y agoGot it. Maybe I always naively assumed there is some shallow FFI layer and all the heavy lifting is done by some set of core standard libraries. Ideally portable to multiple environments.
- skybrian 3y agoThere’s some of that. I/O in node is done by a C library called libuv [1]. It’s portable and it’s used by other languages too. Deno doesn’t use it, though. They use Rust ecosystem libraries like tokio. [2] [1] http://docs.libuv.org/en/v1.x/ http://docs.libuv.org/en/v1.x/ [2] https://choubey.gitbook.io/internals-of-deno/architecture/tokio https://choubey.gitbook.io/internals-of-deno/architecture/to...