summaryrefslogtreecommitdiff
path: root/runtime/ops/runtime.rs
AgeCommit message (Collapse)Author
2024-10-22refactor(runtime/ops): use concrete error types (#26409)Leo Kettmeir
2024-09-16feat(permissions): `Deno.mainModule` doesn't require permissions (#25667)Nathan Whitaker
Closes https://github.com/denoland/deno/issues/7315.
2024-08-02Revert "feat: async context" (#24856)snek
Reverts denoland/deno#24402 deno_web can't depend on code in runtime
2024-08-02feat: async context (#24402)snek
We are switching to ContinuationPreservedEmbedderData. This allows adding async context tracking to the various async operations that deno provides. Fixes: https://github.com/denoland/deno/issues/7010 Fixes: https://github.com/denoland/deno/issues/22886 Fixes: https://github.com/denoland/deno/issues/24368
2024-06-06refactor: remove `PermissionsContainer` in deno_runtime (#24119)David Sherret
Also removes permissions being passed in for node resolution. It was completely useless because we only checked it for reading package.json files, but Deno reading package.json files for resolution is perfectly fine. My guess is this is also a perf improvement because Deno is doing less work.
2024-01-30fix(runtime): return number from `op_ppid` instead of bigint (#22169)Yusuke Tanaka
Fixes #22166
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-10-04refactor: rewrite websocket to use op2 macro (#20140)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-12refactor: rewrite runtime/ ops to op2 (#20459)Bartek Iwańczuk
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-06-03refactor(core): remove force_op_registration and cleanup ↵Nayeem Rahman
JsRuntimeForSnapshot (#19353) Addresses https://github.com/denoland/deno/pull/19308#discussion_r1212248194. Removes force_op_registration as it is no longer necessary.
2023-05-01perf: lazily retrieve ppid (#18940)David Sherret
This is very apparent on Windows. Before: 45.74ms (Hello world) After: 33.92ms Closes #18939
2023-03-18Reland "perf(core): preserve ops between snapshots (#18080)" (#18272)Bartek Iwańczuk
Relanding 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4
2023-03-18Revert "perf(core): preserve ops between snapshots (#18080)" (#18267)Bartek Iwańczuk
This reverts commit 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4.
2023-03-18perf(core): preserve ops between snapshots (#18080)Bartek Iwańczuk
This commit changes the build process in a way that preserves already registered ops in the snapshot. This allows us to skip creating hundreds of "v8::String" on each startup, but sadly there is still some op registration going on startup (however we're registering 49 ops instead of >200 ops). This situation could be further improved, by moving some of the ops from "runtime/" to a separate extension crates. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-17perf(core) Reduce copying and cloning in extension initialization (#18252)Matt Mastracci
Follow-up to #18210: * we are passing the generated `cfg` object into the state function rather than passing individual config fields * reduce cloning dramatically by making the state_fn `FnOnce` * `take` for `ExtensionBuilder` to avoid more unnecessary copies * renamed `config` to `options`
2023-03-17feat(core) deno_core::extension! macro to simplify extension registration ↵Matt Mastracci
(#18210) This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements: * `deno_core::ops!` registers a block of `#[op]`s, optionally with type parameters, useful for places where we share lists of ops * `deno_core::extension!` is used to register an extension, and creates two methods that can be used at runtime/snapshot generation time: `init_ops` and `init_ops_and_esm`. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-07refactor(core): don't use Result in ExtensionBuilder::state (#18066)Bartek Iwańczuk
There's no point for this API to expect result. If something fails it should result in a panic during build time to signal to embedder that setup is wrong.
2023-02-22perf: remove `current_dir()` call in `Deno.mainModule` (#17883)David Sherret
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
2023-01-08feat(core): allow specifying name and dependencies of an Extension (#17301)Leo Kettmeir
2023-01-07refactor(permissions): add PermissionsContainer struct for internal ↵Bartek Iwańczuk
mutability (#17134) Turns out we were cloning permissions which after prompting were discarded, so the state of permissions was never preserved. To handle that we need to store all permissions behind "Arc<Mutex<>>" (because there are situations where we need to send them to other thread). Testing and benching code still uses "Permissions" in most places - it's undesirable to share the same permission set between various test/bench files - otherwise granting or revoking permissions in one file would influence behavior of other test files.
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-09-27feat: Add requesting API name to permission prompt (#15936)Bartek Iwańczuk
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-07-15chore: fix Windows specific clippy errors (#15212)David Sherret
2022-03-14feat(ops): custom arity (#13949)Aaron O'Mullan
Also cleanup & drop ignored wildcard op-args
2022-03-14feat(core): codegen ops (#13861)Divy Srivastava
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-11-16refactor: re-export anyhow from deno_core (#12777)Ryan Dahl
2021-10-05chore: various op cleanup (#12329)Leo K
2021-05-08cleanup(ops): remove unused ZeroCopyBuf arg-types (#10530)Aaron O'Mullan
2021-05-02refactor(runtime): use Extensions (#10461)Aaron O'Mullan
2021-04-28core: introduce extensions (#9800)Aaron O'Mullan
Extensions allow declarative extensions to "JsRuntime" (ops, state, JS or middleware). This allows for: - `op_crates` to be plug-and-play & self-contained, reducing complexity leaked to consumers - op middleware (like metrics_op) to be opt-in and for new middleware (unstable, tracing,...) - `MainWorker` and `WebWorker` to be composable, allowing users to extend workers with their ops whilst benefiting from the other infrastructure (inspector, etc...) In short extensions improve deno's modularity, reducing complexity and leaky abstractions for embedders and the internal codebase.
2021-04-21fix: do not panic on not found cwd (#10238)Satya Rohith
2021-04-12refactor(deno): remove concept of bin & json ops (#10145)Aaron O'Mullan
2021-04-12feat(runtime/permissions): prompt fallback (#9376)crowlKats
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-04-05refactor: convert ops to use serde_v8 (#10009)Aaron O'Mullan
This commit rewrites most of the ops to use "serde_v8" instead of "json" serialization.
2021-04-02refactor(ops): remove variadic buffers (#9944)Aaron O'Mullan
2021-03-17refactor: clean up permission handling (#9367)crowlKats
2021-02-21feat(unstable): per op metrics (#9240)Luca Casonato
2021-02-17Make ModuleSpecifier a type alias, not wrapper struct (#9531)Ryan Dahl
2021-02-12chore: Update to Rust 1.50.0 (#9479)Kitson Kelly
2021-01-10update copyright to 2021 (#9081)Ryan Dahl
2020-12-13refactor: deno_runtime crate (#8640)Bartek Iwańczuk
This commit moves Deno JS runtime, ops, permissions and inspector implementation to new "deno_runtime" crate located in "runtime/" directory. Details in "runtime/README.md". Co-authored-by: Ryan Dahl <ry@tinyclouds.org>