2023-01-02 16:00:42 -05:00
|
|
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
2023-02-20 21:45:34 +01:00
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
2022-07-05 00:12:41 +02:00
|
|
|
use deno_core::Snapshot;
|
|
|
|
|
2023-02-20 21:45:34 +01:00
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
2023-03-07 08:57:58 -04:00
|
|
|
static RUNTIME_SNAPSHOT: &[u8] =
|
2023-02-20 21:45:34 +01:00
|
|
|
include_bytes!(concat!(env!("OUT_DIR"), "/RUNTIME_SNAPSHOT.bin"));
|
|
|
|
|
|
|
|
#[cfg(not(feature = "dont_create_runtime_snapshot"))]
|
2022-07-05 00:12:41 +02:00
|
|
|
pub fn deno_isolate_init() -> Snapshot {
|
2023-03-07 08:57:58 -04:00
|
|
|
Snapshot::Static(RUNTIME_SNAPSHOT)
|
2022-07-05 00:12:41 +02:00
|
|
|
}
|
|
|
|
|
2023-02-20 21:45:34 +01:00
|
|
|
#[cfg(not(feature = "include_js_files_for_snapshotting"))]
|
2023-02-08 22:40:18 +01:00
|
|
|
pub static SOURCE_CODE_FOR_99_MAIN_JS: &str = include_str!("js/99_main.js");
|
2023-02-20 21:45:34 +01:00
|
|
|
|
|
|
|
#[cfg(feature = "include_js_files_for_snapshotting")]
|
|
|
|
pub static PATH_FOR_99_MAIN_JS: &str =
|
|
|
|
concat!(env!("CARGO_MANIFEST_DIR"), "/js/99_main.js");
|