summaryrefslogtreecommitdiff
path: root/runtime/Cargo.toml
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2024-01-22 12:37:25 +0000
committerGitHub <noreply@github.com>2024-01-22 12:37:25 +0000
commitbc92f872988fd8b9cdf2ae1479278789911237a5 (patch)
tree1eb4434b041edc3d159063f4f1dee1ce86a98997 /runtime/Cargo.toml
parent8f767627938ef10802864419061e58a8a75db567 (diff)
fix(runtime): only discard extension sources if a snapshot is provided (#22023)
Fixes #21928. We have a code path which empties the extension sources because they're expected to be pre-executed in the snapshot. Instead of using conditional compilation for that, we now just check if a snapshot was provided. Removes the `dont_use_runtime_snapshot` feature. We didn't allow not providing a snapshot unless this feature was provided, now we always do. Adds the `only_snapshotted_js_sources` feature for us to use in CLI. This asserts that a snapshot is provided and gates the runtime transpilation code so it isn't included in the executable.
Diffstat (limited to 'runtime/Cargo.toml')
-rw-r--r--runtime/Cargo.toml8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml
index 0b07839b2..c3bcfb9bf 100644
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -12,8 +12,6 @@ description = "Provides the deno runtime library"
[features]
# "fake" feature that allows to generate docs on docs.rs
docsrs = []
-# A feature that disables the requirement for startup snapshot to be provided.
-dont_use_runtime_snapshot = []
# A feature that allows excluding `./js/99_main.js` from the exported extension.
exclude_runtime_main_js = []
# A feature that disables embedding of the JavaScript source files in the binary.
@@ -24,7 +22,11 @@ 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 = []
+__runtime_js_sources = ["include_js_files_for_snapshotting"]
+# Signal that only snapshotted JS sources should be used. This will
+# conditionally exclude the runtime source transpilation logic, and add an
+# assertion that a snapshot is provided.
+only_snapshotted_js_sources = ["include_js_files_for_snapshotting"]
[lib]
name = "deno_runtime"