summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/build.rs22
-rw-r--r--cli/standalone.rs1
-rw-r--r--cli/worker.rs2
3 files changed, 11 insertions, 14 deletions
diff --git a/cli/build.rs b/cli/build.rs
index 846224af2..804f1d838 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -276,8 +276,7 @@ mod ts {
cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"),
snapshot_path,
startup_snapshot: None,
- extensions: vec![],
- extensions_with_js: vec![tsc_extension],
+ extensions: vec![tsc_extension],
// NOTE(bartlomieju): Compressing the TSC snapshot in debug build took
// ~45s on M1 MacBook Pro; without compression it took ~1s.
@@ -321,7 +320,7 @@ mod ts {
}
fn create_cli_snapshot(snapshot_path: PathBuf) {
- let extensions: Vec<Extension> = vec![
+ let mut extensions: Vec<Extension> = vec![
deno_webidl::init(),
deno_console::init(),
deno_url::init_ops(),
@@ -364,20 +363,21 @@ fn create_cli_snapshot(snapshot_path: PathBuf) {
std::path::PathBuf::from(deno_runtime::js::PATH_FOR_99_MAIN_JS),
),
});
- let extensions_with_js = vec![Extension::builder("cli")
- // FIXME(bartlomieju): information about which extensions were
- // already snapshotted is not preserved in the snapshot. This should be
- // fixed, so we can reliably depend on that information.
- // .dependencies(vec!["runtime"])
- .esm(esm_files)
- .build()];
+ extensions.push(
+ Extension::builder("cli")
+ // FIXME(bartlomieju): information about which extensions were
+ // already snapshotted is not preserved in the snapshot. This should be
+ // fixed, so we can reliably depend on that information.
+ // .dependencies(vec!["runtime"])
+ .esm(esm_files)
+ .build(),
+ );
create_snapshot(CreateSnapshotOptions {
cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"),
snapshot_path,
startup_snapshot: Some(deno_runtime::js::deno_isolate_init()),
extensions,
- extensions_with_js,
compression_cb: Some(Box::new(|vec, snapshot_slice| {
lzzzz::lz4_hc::compress_to_vec(
snapshot_slice,
diff --git a/cli/standalone.rs b/cli/standalone.rs
index 7d13f91a8..87e0be23a 100644
--- a/cli/standalone.rs
+++ b/cli/standalone.rs
@@ -278,7 +278,6 @@ pub async fn run(
inspect: ps.options.is_inspecting(),
},
extensions: ops::cli_exts(ps),
- extensions_with_js: vec![],
startup_snapshot: Some(crate::js::deno_isolate_init()),
unsafely_ignore_certificate_errors: metadata
.unsafely_ignore_certificate_errors,
diff --git a/cli/worker.rs b/cli/worker.rs
index 17d1d3c43..050891256 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -524,7 +524,6 @@ async fn create_main_worker_internal(
inspect: ps.options.is_inspecting(),
},
extensions,
- extensions_with_js: vec![],
startup_snapshot: Some(crate::js::deno_isolate_init()),
unsafely_ignore_certificate_errors: ps
.options
@@ -758,7 +757,6 @@ mod tests {
inspect: false,
},
extensions: vec![],
- extensions_with_js: vec![],
startup_snapshot: Some(crate::js::deno_isolate_init()),
unsafely_ignore_certificate_errors: None,
root_cert_store: None,