mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
refactor: internal runtime code TS support (#17672)
This is a proof of concept for being able to snapshot TypeScript files. Currently only a single runtime file is authored in TypeScript - "runtime/js/01_version.ts". Not needed infrastructure was removed from "core/snapshot_util.rs". --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
bef50416b9
commit
286e5d0be9
14 changed files with 261 additions and 113 deletions
|
@ -2,7 +2,6 @@
|
|||
use deno_core::Snapshot;
|
||||
use log::debug;
|
||||
use once_cell::sync::Lazy;
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub static RUNTIME_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
||||
#[allow(clippy::uninit_vec)]
|
||||
|
@ -35,8 +34,5 @@ pub fn deno_isolate_init() -> Snapshot {
|
|||
Snapshot::Static(&RUNTIME_SNAPSHOT)
|
||||
}
|
||||
|
||||
pub fn get_99_main() -> PathBuf {
|
||||
let manifest = env!("CARGO_MANIFEST_DIR");
|
||||
let path = PathBuf::from(manifest);
|
||||
path.join("js").join("99_main.js")
|
||||
}
|
||||
#[cfg(feature = "snapshot_from_snapshot")]
|
||||
pub static SOURCE_CODE_FOR_99_MAIN_JS: &str = include_str!("js/99_main.js");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue