Reland "Create an old program to be used in snapshot." (#3747)

* read CLI assets from disk during snapshotting
This commit is contained in:
Bartek Iwańczuk 2020-01-22 20:18:01 +01:00 committed by GitHub
parent 3c47718959
commit bd9561f4de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 126 additions and 64 deletions

View file

@ -16,15 +16,7 @@ pub static COMPILER_SNAPSHOT_MAP: &[u8] =
pub static COMPILER_SNAPSHOT_DTS: &[u8] =
include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.d.ts"));
static DENO_RUNTIME: &str = include_str!("js/lib.deno_runtime.d.ts");
/// Same as deno_typescript::get_asset but also has lib.deno_runtime.d.ts
pub fn get_asset(name: &str) -> Option<&'static str> {
match name {
"lib.deno_runtime.d.ts" => Some(DENO_RUNTIME),
_ => deno_typescript::get_asset(name),
}
}
pub static DENO_RUNTIME: &str = include_str!("js/lib.deno_runtime.d.ts");
#[test]
fn cli_snapshot() {