From c1c8eb3d558bedf6588179ae93737bd6afe5a368 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 6 Aug 2023 00:47:15 +0100 Subject: build: allow disabling snapshots for dev (#20048) Closes #19399 (running without snapshots at all was suggested as an alternative solution). Adds a `__runtime_js_sources` pseudo-private feature to load extension JS sources at runtime for faster development, instead of building and loading snapshots or embedding sources in the binary. Will only work in a development environment obviously. Try running `cargo test --features __runtime_js_sources integration::node_unit_tests::os_test`. Then break some behaviour in `ext/node/polyfills/os.ts` e.g. make `function cpus() {}` return an empty array, and run it again. Fix and then run again. No more build time in between. --- runtime/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/Cargo.toml') diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 4850a5255..a7463920a 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -23,6 +23,9 @@ snapshot_from_snapshot = [] include_js_files_for_snapshotting = [ "deno_core/include_js_files_for_snapshotting", ] +# A dev feature to disable creations and loading of snapshots in favor of +# loading JS sources at runtime. +__runtime_js_sources = ["dont_create_runtime_snapshot"] [lib] name = "deno_runtime" @@ -64,6 +67,7 @@ winres.workspace = true winapi.workspace = true [dependencies] +deno_ast.workspace = true deno_broadcast_channel.workspace = true deno_cache.workspace = true deno_console.workspace = true -- cgit v1.2.3