0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-14 17:47:35 -05:00
denoland-deno/runtime
denobot 85de4280a1
1.45.2 (#24561)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-07-12 16:04:46 -04:00
..
examples/extension refactor: remove PermissionsContainer in deno_runtime (#24119) 2024-06-06 23:37:53 -04:00
js feat(jupyter): support confirm and prompt in notebooks (#23592) 2024-07-04 22:12:14 +00:00
ops fix(permissions): handle ipv6 addresses correctly (#24397) 2024-07-05 23:45:06 +01:00
permissions 1.45.2 (#24561) 2024-07-12 16:04:46 -04:00
Cargo.toml 1.45.2 (#24561) 2024-07-12 16:04:46 -04:00
clippy.toml
code_cache.rs fix: use hash of in-memory bytes only for code cache (#23966) 2024-05-24 10:15:46 -04:00
errors.rs
fmt_errors.rs
fs_util.rs fix: use hash of in-memory bytes only for code cache (#23966) 2024-05-24 10:15:46 -04:00
inspector_server.rs
js.rs
lib.rs fix(cli): missing flag for --unstable-process (#24199) 2024-06-13 16:00:38 +03:00
README.md
shared.rs fix: better handling of npm resolution occurring on workers (#24094) 2024-06-05 17:04:16 +02:00
snapshot.rs fix(ext/node): fix vm memory usage and context initialization (#23976) 2024-06-12 22:32:54 +05:30
tokio_util.rs
web_worker.rs chore: rename __runtime_js_source to hmr (#24442) 2024-07-05 17:47:53 +05:30
worker.rs chore: rename __runtime_js_source to hmr (#24442) 2024-07-05 17:47:53 +05:30
worker_bootstrap.rs

deno_runtime crate

crates docs

This is a slim version of the Deno CLI which removes typescript integration and various tooling (like lint and doc). Basically only JavaScript execution with Deno's operating system bindings (ops).

Stability

This crate is built using battle-tested modules that were originally in the deno crate, however the API of this crate is subject to rapid and breaking changes.

MainWorker

The main API of this crate is MainWorker. MainWorker is a structure encapsulating deno_core::JsRuntime with a set of ops used to implement Deno namespace.

When creating a MainWorker implementors must call MainWorker::bootstrap to prepare JS runtime for use.

MainWorker is highly configurable and allows to customize many of the runtime's properties:

  • module loading implementation
  • error formatting
  • support for source maps
  • support for V8 inspector and Chrome Devtools debugger
  • HTTP client user agent, CA certificate
  • random number generator seed

Worker Web API

deno_runtime comes with support for Worker Web API. The Worker API is implemented using WebWorker structure.

When creating a new instance of MainWorker implementors must provide a callback function that is used when creating a new instance of Worker.

All WebWorker instances are descendents of MainWorker which is responsible for setting up communication with child worker. Each WebWorker spawns a new OS thread that is dedicated solely to that worker.