You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove usage of said snapshot in "runtime/worker.rs" and "runtime/web_worker.rs" - the snapshot is used as a fallback if user doesn't provide snapshot of their own:
This is really only used by the embedders of the "deno_runtime" crate (we don't use it in CLI anyway). We can handle this better by defaulting to not using a snapshot and instead embedding the source files in the binary (similarly to what happens if "__runtime_js_source" cargo feature is used). With Snapshots: factor out generation of "runtime/" snapshot to a helper module #21134 it should be very easy for embedders to create a snapshot and integrate it into their own build script
Special care needs to be taken to account for include_js_files_for_snapshotting cargo feature used both in deno_core and deno_runtime.
I expect this effort to happen over several PRs.
The text was updated successfully, but these errors were encountered:
This commit removes some of the technical debt related
to snapshotting JS code:
- "cli/ops/mod.rs" and "cli/build.rs" no longer define "cli" extension
which was not required anymore
- Cargo features for "deno_runtime" crate have been unified in
"cli/Cargo.toml"
- "cli/build.rs" uses "deno_runtime::snapshot::create_runtime_snapshot"
API
instead of copy-pasting the code
- "cli/js/99_main.js" was completely removed as it's not necessary
anymore
Towards #21137
Following issues need to be addressed first:
Once we do all of them, we can start to remove snapshot creating in the "runtime/" crate. This will involve several stages:
dont_create_runtime_snapshot
:https://github.com/denoland/deno/blob/9010b8df53cd37f0410e08c43a194667974686a2/runtime/js.rs#L5C19-L19
This cargo feature is already clunky to use - we don't specify it for
deno_runtime
build dependency in "cli":deno/cli/Cargo.toml
Lines 34 to 35 in 9010b8d
but specify it for regular dependency:
deno/cli/Cargo.toml
Line 58 in 9010b8d
Lots of complexity for little gain...
deno/runtime/worker.rs
Lines 352 to 354 in 9010b8d
This is really only used by the embedders of the "deno_runtime" crate (we don't use it in CLI anyway). We can handle this better by defaulting to not using a snapshot and instead embedding the source files in the binary (similarly to what happens if "__runtime_js_source" cargo feature is used). With Snapshots: factor out generation of "runtime/" snapshot to a helper module #21134 it should be very easy for embedders to create a snapshot and integrate it into their own build script
Special care needs to be taken to account for
include_js_files_for_snapshotting
cargo feature used both indeno_core
anddeno_runtime
.I expect this effort to happen over several PRs.
The text was updated successfully, but these errors were encountered: