diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-20 21:45:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 21:45:34 +0100 |
| commit | 914b08fc19e5c7268e7b04a216337e765d6a06e8 (patch) | |
| tree | 39f73f4e046346f358d74ff10f62cb2d5f7078a8 /runtime/Cargo.toml | |
| parent | 4d1a14ca7fa9496f36470a7771448a9b006b0204 (diff) | |
build: add "include_js_files_for_snapshotting" Cargo feature (#17826)
This allows to not include source code into the binary (because
it will already be included in the V8 snapshot).
Nothing changes for the embedders - everything should still build the
same.
This commit brings the binary size from 87Mb to 82Mb on M1.
Alternative to https://github.com/denoland/deno/pull/17820 and
https://github.com/denoland/deno/pull/17653
---------
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'runtime/Cargo.toml')
| -rw-r--r-- | runtime/Cargo.toml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 2d93f9dff..b2ef0637a 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -12,8 +12,17 @@ description = "Provides the deno runtime library" [features] # "fake" feature that allows to generate docs on docs.rs docsrs = [] -# feature that modifies the snapshot to allow extending it +# A feature that disables creation of startup snapshot during in the build script. +dont_create_runtime_snapshot = [] +# A feature that changes how startup snapshot is generated, that allows +# extending it in embedder crates. snapshot_from_snapshot = [] +# A feature that disables embedding of the JavaScript source files in the binary. +# With this feature enabled, the sources must be consumed during build time, +# by creating a startup snapshot. +include_js_files_for_snapshotting = [ + "deno_core/include_js_files_for_snapshotting", +] [lib] name = "deno_runtime" |
