diff options
Diffstat (limited to 'src/snapshot.rs')
-rw-r--r-- | src/snapshot.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/snapshot.rs b/src/snapshot.rs index fa7837ede..264395093 100644 --- a/src/snapshot.rs +++ b/src/snapshot.rs @@ -2,8 +2,13 @@ use libdeno::deno_buf; pub fn deno_snapshot() -> deno_buf { + #[cfg(not(feature = "check-only"))] let data = include_bytes!(concat!(env!("GN_OUT_DIR"), "/gen/snapshot_deno.bin")); + // The snapshot blob is not available when the Rust Language Server runs + // 'cargo check'. + #[cfg(feature = "check-only")] + let data = vec![]; unsafe { deno_buf::from_raw_parts(data.as_ptr(), data.len()) } } |