summaryrefslogtreecommitdiff
path: root/src/snapshot.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-11-23 09:19:14 -0800
committerRyan Dahl <ry@tinyclouds.org>2018-11-23 11:26:36 -0800
commit2ffd78daf9956a24098d1f959f21882e350e9d37 (patch)
treea58b77d551d4b1488951bcac106ed28b30b51af0 /src/snapshot.rs
parent3d03f5b0cb3c513e449f3aaa5d35c493b72f47b4 (diff)
Revert "Use include_bytes! instead of incbin. (#1182)"
Reverting because this is causing Appveyor to be red. However I hope we can reintroduce include_bytes! soon in a way that works on windows. Fixes #1208. This reverts commits 96c3641fffe8509af9351cec4580861e76d89cc9 and 92e404706b0b1a26cdaf6f8cf81aac148292557f.
Diffstat (limited to 'src/snapshot.rs')
-rw-r--r--src/snapshot.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/snapshot.rs b/src/snapshot.rs
index fcb41f6c8..52c8df47d 100644
--- a/src/snapshot.rs
+++ b/src/snapshot.rs
@@ -1,19 +1,5 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
use libdeno::deno_buf;
-use std;
-
-pub fn deno_snapshot() -> deno_buf {
- let data =
- include_bytes!(concat!(env!("GN_OUT_DIR"), "/gen/snapshot_deno.bin"));
- let ptr = data.as_ptr();
- // TODO The transmute is not necessary here. deno_buf specifies mutable
- // pointers when it doesn't necessarally need mutable. So maybe the deno_buf
- // type should be broken into a mutable and non-mutable version?
- let ptr_mut = unsafe { std::mem::transmute::<*const u8, *mut u8>(ptr) };
- deno_buf {
- alloc_ptr: std::ptr::null_mut(),
- alloc_len: 0,
- data_ptr: ptr_mut,
- data_len: data.len(),
- }
+extern "C" {
+ pub static deno_snapshot: deno_buf;
}