mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
refactor: remove snapshotting from deno_runtime (#21794)
Closes https://github.com/denoland/deno/issues/21137
This commit is contained in:
parent
0234eb23dd
commit
d4893eb51a
7 changed files with 31 additions and 357 deletions
|
@ -1,22 +1,4 @@
|
|||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||
use deno_core::Snapshot;
|
||||
use log::debug;
|
||||
|
||||
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
||||
static RUNTIME_SNAPSHOT: &[u8] =
|
||||
include_bytes!(concat!(env!("OUT_DIR"), "/RUNTIME_SNAPSHOT.bin"));
|
||||
|
||||
pub fn deno_isolate_init() -> Option<Snapshot> {
|
||||
debug!("Deno isolate init with snapshots.");
|
||||
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
||||
{
|
||||
Some(Snapshot::Static(RUNTIME_SNAPSHOT))
|
||||
}
|
||||
#[cfg(feature = "dont_create_runtime_snapshot")]
|
||||
{
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "include_js_files_for_snapshotting"))]
|
||||
pub static SOURCE_CODE_FOR_99_MAIN_JS: &str = include_str!("js/99_main.js");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue