2024-01-01 14:58:21 -05:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-01-13 02:51:32 -05:00
|
|
|
|
2023-03-08 10:44:04 -05:00
|
|
|
use log::debug;
|
2022-11-21 08:36:26 -05:00
|
|
|
|
2023-08-05 19:47:15 -04:00
|
|
|
#[cfg(not(feature = "__runtime_js_sources"))]
|
2023-03-16 23:19:46 -04:00
|
|
|
static CLI_SNAPSHOT: &[u8] =
|
|
|
|
include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.bin"));
|
2022-11-21 08:36:26 -05:00
|
|
|
|
2024-02-27 10:05:57 -05:00
|
|
|
pub fn deno_isolate_init() -> Option<&'static [u8]> {
|
2023-03-08 10:44:04 -05:00
|
|
|
debug!("Deno isolate init with snapshots.");
|
2023-08-05 19:47:15 -04:00
|
|
|
#[cfg(not(feature = "__runtime_js_sources"))]
|
|
|
|
{
|
2024-02-27 10:05:57 -05:00
|
|
|
Some(CLI_SNAPSHOT)
|
2023-08-05 19:47:15 -04:00
|
|
|
}
|
|
|
|
#[cfg(feature = "__runtime_js_sources")]
|
|
|
|
{
|
|
|
|
None
|
|
|
|
}
|
2022-11-21 08:36:26 -05:00
|
|
|
}
|