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