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