2023-01-02 16:00:42 -05:00
|
|
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
2023-02-20 15:45:34 -05:00
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
2022-07-04 18:12:41 -04:00
|
|
|
use deno_core::Snapshot;
|
2023-03-08 10:44:04 -05:00
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
|
|
|
use log::debug;
|
2022-07-04 18:12:41 -04:00
|
|
|
|
2023-02-20 15:45:34 -05:00
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
2023-03-16 23:19:46 -04:00
|
|
|
static RUNTIME_SNAPSHOT: &[u8] =
|
2023-02-20 15:45:34 -05:00
|
|
|
include_bytes!(concat!(env!("OUT_DIR"), "/RUNTIME_SNAPSHOT.bin"));
|
|
|
|
|
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
2022-07-04 18:12:41 -04:00
|
|
|
pub fn deno_isolate_init() -> Snapshot {
|
2023-03-08 10:44:04 -05:00
|
|
|
debug!("Deno isolate init with snapshots.");
|
2023-03-16 23:19:46 -04:00
|
|
|
Snapshot::Static(RUNTIME_SNAPSHOT)
|
2022-07-04 18:12:41 -04:00
|
|
|
}
|