summaryrefslogtreecommitdiff
path: root/cli/Cargo.toml
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-08-06 00:47:15 +0100
committerGitHub <noreply@github.com>2023-08-06 01:47:15 +0200
commitc1c8eb3d558bedf6588179ae93737bd6afe5a368 (patch)
treee6ba4d8aa59a8b73e224fd218cf6e102a81974d9 /cli/Cargo.toml
parentb96f28306490a56aac91b8ef06b35ebdc7f41b63 (diff)
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.
Diffstat (limited to 'cli/Cargo.toml')
-rw-r--r--cli/Cargo.toml5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 5ee0bd22d..c1779c102 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -26,6 +26,11 @@ name = "lsp_bench_standalone"
harness = false
path = "./bench/lsp_bench_standalone.rs"
+[features]
+# A dev feature to disable creations and loading of snapshots in favor of
+# loading JS sources at runtime.
+__runtime_js_sources = ["deno_runtime/__runtime_js_sources"]
+
[build-dependencies]
deno_runtime = { workspace = true, features = ["snapshot_from_snapshot", "include_js_files_for_snapshotting"] }
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }