summaryrefslogtreecommitdiff
path: root/cli/ops
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-12-03 00:40:27 +0100
committerGitHub <noreply@github.com>2023-12-02 23:40:27 +0000
commitf6b889b43219e3c9be770c8b2758bff3048ddcbd (patch)
treed379a0a92e301b548ba91697804650fb13eba046 /cli/ops
parent0f990d9d927a0b25bc0eac32f2e7eee7c0460693 (diff)
refactor: snapshotting of runtime/ and cli/ (#21430)
This commit removes some of the technical debt related to snapshotting JS code: - "cli/ops/mod.rs" and "cli/build.rs" no longer define "cli" extension which was not required anymore - Cargo features for "deno_runtime" crate have been unified in "cli/Cargo.toml" - "cli/build.rs" uses "deno_runtime::snapshot::create_runtime_snapshot" API instead of copy-pasting the code - "cli/js/99_main.js" was completely removed as it's not necessary anymore Towards https://github.com/denoland/deno/issues/21137
Diffstat (limited to 'cli/ops')
-rw-r--r--cli/ops/mod.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/cli/ops/mod.rs b/cli/ops/mod.rs
index f34e5f39c..f26a5f29e 100644
--- a/cli/ops/mod.rs
+++ b/cli/ops/mod.rs
@@ -1,35 +1,5 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-use deno_core::Extension;
-
pub mod bench;
pub mod jupyter;
pub mod testing;
-
-pub fn cli_exts() -> Vec<Extension> {
- vec![
- #[cfg(not(feature = "__runtime_js_sources"))]
- cli::init_ops(),
- #[cfg(feature = "__runtime_js_sources")]
- cli::init_ops_and_esm(),
- ]
-}
-
-// ESM parts duplicated in `../build.rs`. Keep in sync!
-deno_core::extension!(cli,
- deps = [runtime],
- esm_entry_point = "ext:cli/99_main.js",
- esm = [
- dir "js",
- "40_testing.js",
- "99_main.js"
- ],
- customizer = |ext: &mut deno_core::Extension| {
- ext.esm_files.to_mut().push(deno_core::ExtensionFileSource {
- specifier: "ext:cli/runtime/js/99_main.js",
- code: deno_core::ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(
- deno_runtime::js::PATH_FOR_99_MAIN_JS,
- ),
- });
- },
-);