diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2023-06-14 00:36:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 22:36:16 +0000 |
commit | 60bf79c18410fd332b6b9b7c222e6d3d62bfe3f8 (patch) | |
tree | 070934eb82d906ee341d1ad4d1390f0b75860529 /runtime/js.rs | |
parent | 82dd90f98d6817caadcb9b6bd81aba80b2ee848d (diff) |
Revert "refactor(core): cleanup feature flags for js source inclusion… (#19490)
… (#19463)"
This reverts commit ceb03cfb037cf7024a5048b17b508ddda59cfa05.
This is being reverted because it causes 3.5Mb increase in the binary
size,
due to runtime JS code being included in the binary, even though it's
already snapshotted.
CC @nayeemrmn
Diffstat (limited to 'runtime/js.rs')
-rw-r--r-- | runtime/js.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/js.rs b/runtime/js.rs index 6aaa32f5f..def2724ce 100644 --- a/runtime/js.rs +++ b/runtime/js.rs @@ -13,3 +13,10 @@ pub fn deno_isolate_init() -> Snapshot { debug!("Deno isolate init with snapshots."); Snapshot::Static(RUNTIME_SNAPSHOT) } + +#[cfg(not(feature = "include_js_files_for_snapshotting"))] +pub static SOURCE_CODE_FOR_99_MAIN_JS: &str = include_str!("js/99_main.js"); + +#[cfg(feature = "include_js_files_for_snapshotting")] +pub static PATH_FOR_99_MAIN_JS: &str = + concat!(env!("CARGO_MANIFEST_DIR"), "/js/99_main.js"); |