|
|
|
|
|
by searchableguy
1344 days ago
|
|
V8 only provides javascript execution. All the browser APIs need to be implemented by runtime such as fetch, filesystem, console, http, Intl, webgpu, serialization, any global objects, cloning, message passing, etc. Any module system and dependency management is part of runtime (loading scripts, running them before executing code, etc). Any other execution context such as workers or running wasm is also responsibility of runtime to implement and manage. FFI or native extensions are also part of runtime. So one may use the built in networking APIs to build a server framework such as express or they may opt to bring their own networking layer through a native extension. Frameworks such as express and next build on top of http node module. Many of these APIs provided by runtime are also simply js scripts run in the global context before running your code. Router is application specific, not part of any of the JS runtime but URL pattern can be used to build a router which is a standardized API implemented by both browsers and deno. Runtime can choose to provide any API they want under their namespace so deno could provide a full blown router if they want to. Does that clear it up? |
|