refactor: remove snapshotting from deno_runtime (#21794)

Closes https://github.com/denoland/deno/issues/21137
This commit is contained in:
Bartek Iwańczuk 2024-01-10 16:30:50 +01:00 committed by GitHub
parent 0234eb23dd
commit d4893eb51a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 357 deletions

View file

@ -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");