diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-02-13 19:44:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 19:44:37 -0700 |
commit | e23fc6d88cc26a234ef2795d0bea1fd2f7fb8bfa (patch) | |
tree | c0c08ba5520610be6f748aa9a75633d87baf5445 /cli/build.rs | |
parent | 082f8128b8d784c599fdf2c0d857dbbe6abbc7fe (diff) |
chore: deno_core bump (#22407)
- Adding `None` flag for warmup script.
- Modify opcall trace interface to match new Rust implementation
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/cli/build.rs b/cli/build.rs index 5fd6ca4d5..71751fb00 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -266,33 +266,36 @@ mod ts { ) .unwrap(); - let output = create_snapshot(CreateSnapshotOptions { - cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), - snapshot_path, - startup_snapshot: None, - extensions: vec![deno_tsc::init_ops_and_esm( - op_crate_libs, - build_libs, - path_dts, - )], - // NOTE(bartlomieju): Compressing the TSC snapshot in debug build took - // ~45s on M1 MacBook Pro; without compression it took ~1s. - // Thus we're not not using compressed snapshot, trading off - // a lot of build time for some startup time in debug build. - #[cfg(debug_assertions)] - compression_cb: None, - - #[cfg(not(debug_assertions))] - compression_cb: Some(Box::new(|vec, snapshot_slice| { - eprintln!("Compressing TSC snapshot..."); - vec.extend_from_slice( - &zstd::bulk::compress(snapshot_slice, 22) - .expect("snapshot compression failed"), - ); - })), - with_runtime_cb: None, - skip_op_registration: false, - }); + let output = create_snapshot( + CreateSnapshotOptions { + cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), + snapshot_path, + startup_snapshot: None, + extensions: vec![deno_tsc::init_ops_and_esm( + op_crate_libs, + build_libs, + path_dts, + )], + // NOTE(bartlomieju): Compressing the TSC snapshot in debug build took + // ~45s on M1 MacBook Pro; without compression it took ~1s. + // Thus we're not not using compressed snapshot, trading off + // a lot of build time for some startup time in debug build. + #[cfg(debug_assertions)] + compression_cb: None, + + #[cfg(not(debug_assertions))] + compression_cb: Some(Box::new(|vec, snapshot_slice| { + eprintln!("Compressing TSC snapshot..."); + vec.extend_from_slice( + &zstd::bulk::compress(snapshot_slice, 22) + .expect("snapshot compression failed"), + ); + })), + with_runtime_cb: None, + skip_op_registration: false, + }, + None, + ); for path in output.files_loaded_during_snapshot { println!("cargo:rerun-if-changed={}", path.display()); } |