From a68eb3fcc3997fce8680f87edce46f6450e79635 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 13 Feb 2024 21:52:30 +0530 Subject: feat: denort binary for `deno compile` (#22205) This introduces the `denort` binary - a slim version of deno without tooling. The binary is used as the default for `deno compile`. Improves `deno compile` final size by ~2.5x (141 MB -> 61 MB) on Linux x86_64. --- .github/workflows/ci.generate.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '.github/workflows/ci.generate.ts') diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 26ca89316..29077ab54 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -704,6 +704,7 @@ const ci = { run: [ "cd target/release", "zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno", + "zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort", "./deno types > lib.deno.d.ts", ].join("\n"), }, @@ -728,6 +729,7 @@ const ci = { "--entitlements-xml-file=cli/entitlements.plist", "cd target/release", "zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno", + "zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort", ] .join("\n"), }, @@ -740,8 +742,10 @@ const ci = { "github.repository == 'denoland/deno'", ].join("\n"), shell: "pwsh", - run: + run: [ "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip", + "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip", + ].join("\n"), }, { name: "Upload canary to dl.deno.land", @@ -942,6 +946,7 @@ const ci = { run: [ 'du -hd1 "./target/${{ matrix.profile }}"', 'du -ha "./target/${{ matrix.profile }}/deno"', + 'du -ha "./target/${{ matrix.profile }}/denort"', ].join("\n"), }, { @@ -1007,10 +1012,15 @@ const ci = { with: { files: [ "target/release/deno-x86_64-pc-windows-msvc.zip", + "target/release/denort-x86_64-pc-windows-msvc.zip", "target/release/deno-x86_64-unknown-linux-gnu.zip", + "target/release/denort-x86_64-unknown-linux-gnu.zip", "target/release/deno-x86_64-apple-darwin.zip", + "target/release/denort-x86_64-apple-darwin.zip", "target/release/deno-aarch64-unknown-linux-gnu.zip", + "target/release/denort-aarch64-unknown-linux-gnu.zip", "target/release/deno-aarch64-apple-darwin.zip", + "target/release/denort-aarch64-apple-darwin.zip", "target/release/deno_src.tar.gz", "target/release/lib.deno.d.ts", ].join("\n"), -- cgit v1.2.3