Prompted by a question on the Deno Discord, I created this repo to measure the size of each canary build of deno
.
![image](https://private-user-images.githubusercontent.com/836375/275914347-56f6e303-9a1a-41be-ae4b-3121d1ecb6ca.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MDUyMjYsIm5iZiI6MTcxODUwNDkyNiwicGF0aCI6Ii84MzYzNzUvMjc1OTE0MzQ3LTU2ZjZlMzAzLTlhMWEtNDFiZS1hZTRiLTMxMjFkMWVjYjZjYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxNlQwMjI4NDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wYmU3NmVjODJiNjFhMzg0MmM0YzdiMTE1NTFhYjliNzZmMmM0ZjQ2OTUyNTUxZDllNmE4NmY5ZTAzZGU4OTk4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.OddvyKEqZDFKMQzJF4hIn1JM-fLqxLYSvj929OYx1yo)
-
main.ts
: service deployed to deno -
mod.ts
: pulls canary build info from GitHub
Read more in Canary Sizes Notebook
scarf
on the Deno Discord had this question:
Are there any guide to build a 'stripped-down' version of
deno
from source? for example, i'd like to build a deno binary that runs typescript files but other additional features likecheck
,fmt
,jupyter
,lsp
removed. this would be useful to reduce binary size in docker container
I figured the addition of Jupyter code was pretty small (main new requirement is zeromq, the rest is all protocols that Jupyter handles). To test that hypothesis, I calculated the Deno size between Linux canaries from dl.deno.land.
You can download the canary for any commit (if built successfully) with a URL like below:
https://dl.deno.land/canary/[COMMIT_HASH]/deno-[TARGET_TUPLE].zip
These are the currently supported target tuples:
-
Apple ARM (64-bit):
aarch64-apple-darwin
-
Apple x86 (64-bit):
x86_64-apple-darwin
-
Linux x86 (64-bit):
x86_64-unknown-linux-gnu
-
Windows x86 (64-bit):
x86_64-pc-windows-msvc
Since scarf wanted this in Docker, I'm only measuring the Linux canary.
- Pull the last N commits
- Determine the size by performing a
HEAD
and pullingcontent-length
- If a commit download isn't found, skip it.