summaryrefslogtreecommitdiff
path: root/cli/js.rs
blob: 2c93f004ca0a67e268cb68240f69b28db70b87e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

use log::debug;

#[cfg(not(feature = "hmr"))]
static CLI_SNAPSHOT: &[u8] =
  include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.bin"));

pub fn deno_isolate_init() -> Option<&'static [u8]> {
  debug!("Deno isolate init with snapshots.");
  #[cfg(not(feature = "hmr"))]
  {
    Some(CLI_SNAPSHOT)
  }
  #[cfg(feature = "hmr")]
  {
    None
  }
}