1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00
A modern runtime for JavaScript and TypeScript. https://deno.com/
Find a file
Nathan Whitaker 2965413374
perf: build denort with panic = "abort" for releases (#27507)
This PR changes CI to build denort with a separate, new build profile
`release-slim` that disables unwinding and strips symbols. This reduces
the size of denort by about 10%

current denort:

```
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  58.1%  39.3Mi  57.9%  39.3Mi    __TEXT,__text
  31.5%  21.3Mi  31.4%  21.3Mi    __TEXT,__const
   2.5%  1.68Mi   2.5%  1.68Mi    __DATA_CONST,__const
   2.4%  1.62Mi   2.4%  1.62Mi    __TEXT,__eh_frame
   2.4%  1.60Mi   2.4%  1.60Mi    __TEXT,__gcc_except_tab
   0.9%   610Ki   0.9%   610Ki    __TEXT,__cstring
   0.8%   536Ki   0.8%   536Ki    Code Signature
   0.7%   507Ki   0.7%   507Ki    __TEXT,__unwind_info
   0.3%   207Ki   0.3%   207Ki    Function Start Addresses
   0.2%   165Ki   0.2%   165Ki    __DATA,__data
   0.0%       0   0.2%   153Ki    __DATA,__bss
   0.1%  51.0Ki   0.1%  51.0Ki    Rebase Info
   0.1%  45.3Ki   0.1%  45.3Ki    __TEXT,__literals
   0.0%  31.4Ki   0.1%  36.8Ki    [15 Others]
   0.0%  25.6Ki   0.0%  25.7Ki    [__TEXT]
   0.0%  19.3Ki   0.0%  20.2Ki    [__DATA]
   0.0%  8.11Ki   0.0%  8.11Ki    Lazy Binding Info
   0.0%       8   0.0%  8.08Ki    [__LINKEDIT]
   0.0%  6.84Ki   0.0%  6.84Ki    Symbol Table
   0.0%  5.55Ki   0.0%  5.55Ki    String Table
   0.0%  5.53Ki   0.0%  5.53Ki    __TEXT,__ustring
 100.0%  67.6Mi 100.0%  67.8Mi    TOTAL
```

built with this PR:

```
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  59.6%  36.6Mi  59.5%  36.6Mi    __TEXT,__text
  34.6%  21.3Mi  34.5%  21.3Mi    __TEXT,__const
   2.7%  1.68Mi   2.7%  1.68Mi    __DATA_CONST,__const
   1.0%   610Ki   1.0%   610Ki    __TEXT,__cstring
   0.8%   487Ki   0.8%   487Ki    Code Signature
   0.3%   193Ki   0.3%   193Ki    Function Start Addresses
   0.3%   165Ki   0.3%   165Ki    __DATA,__data
   0.0%       0   0.2%   153Ki    __DATA,__bss
   0.2%   152Ki   0.2%   152Ki    __TEXT,__unwind_info
   0.1%  69.5Ki   0.1%  69.5Ki    __TEXT,__eh_frame
   0.1%  50.9Ki   0.1%  50.9Ki    Rebase Info
   0.1%  45.3Ki   0.1%  45.3Ki    __TEXT,__literals
   0.1%  34.1Ki   0.1%  39.5Ki    [15 Others]
   0.0%  19.3Ki   0.0%  20.2Ki    [__DATA]
   0.0%  19.6Ki   0.0%  19.7Ki    [__TEXT]
   0.0%  16.6Ki   0.0%  16.6Ki    __TEXT,__gcc_except_tab
   0.0%  8.09Ki   0.0%  8.09Ki    Lazy Binding Info
   0.0%       8   0.0%  7.69Ki    [__LINKEDIT]
   0.0%  6.83Ki   0.0%  6.83Ki    Symbol Table
   0.0%  5.77Ki   0.0%  5.77Ki    [__DATA_CONST]
   0.0%  5.53Ki   0.0%  5.53Ki    __TEXT,__ustring
 100.0%  61.4Mi 100.0%  61.6Mi    TOTAL
```

A caveat is that this will increase release build times in CI since it
requires building twice - once with unwinding and once without
2024-12-31 11:19:00 -08:00
.cargo feat: bring back WebGPU (#20812) 2023-12-09 01:19:16 +01:00
.devcontainer chore: remove protoc dep from CI (#26050) 2024-10-07 15:11:31 +00:00
.github perf: build denort with panic = "abort" for releases (#27507) 2024-12-31 11:19:00 -08:00
bench_util chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
cli chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
ext chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
resolvers chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
runtime chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
tests chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
tools chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
.dlint.json chore: enable no-console dlint rule (#25113) 2024-08-20 15:14:37 -04:00
.dprint.json chore: cargo fmt - turn on group_imports=StdExternalCrate (#26646) 2024-12-31 12:13:39 -05:00
.editorconfig chore(tests): Remove vestiges of cli/tests folder (#22712) 2024-03-05 13:49:21 -07:00
.gitattributes chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
.gitignore chore: move tools/wpt to tests/wpt/runner (#22545) 2024-03-05 00:41:16 +00:00
.gitmodules chore: make remaining submodules shallow (#23441) 2024-04-18 19:45:09 +00:00
.rustfmt.toml chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
Cargo.lock refactor: do not use deno_fs::FileSystem everywhere (#27508) 2024-12-31 11:29:07 -05:00
Cargo.toml perf: build denort with panic = "abort" for releases (#27507) 2024-12-31 11:19:00 -08:00
import_map.json chore: update std submodule (#25595) 2024-09-12 22:32:09 +10:00
LICENSE.md chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
README.md docs(readme): Add winget instructions (#25136) 2024-10-26 23:31:44 +00:00
Releases.md chore: forward v2.1.4 release commit to main (#27329) 2024-12-11 12:47:31 +00:00
rust-toolchain.toml chore: upgrade to rust 1.82 and LLVM 19 (#26615) 2024-11-01 16:13:02 +05:30

Deno

Twitter badge Discord badge YouTube badge

the deno mascot dinosaur standing in the rain

Deno (/ˈdiːnoʊ/, pronounced dee-no) is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults and a great developer experience. It's built on V8, Rust, and Tokio.

Learn more about the Deno runtime in the documentation.

Installation

Install the Deno runtime on your system using one of the commands below. Note that there are a number of ways to install Deno - a comprehensive list of installation options can be found here.

Shell (Mac, Linux):

curl -fsSL https://deno.land/install.sh | sh

PowerShell (Windows):

irm https://deno.land/install.ps1 | iex

Homebrew (Mac):

brew install deno

Chocolatey (Windows):

choco install deno

WinGet (Windows):

winget install --id=DenoLand.Deno

Build and install from source

Complete instructions for building Deno from source can be found in the manual here.

Your first Deno program

Deno can be used for many different applications, but is most commonly used to build web servers. Create a file called server.ts and include the following TypeScript code:

Deno.serve((_req: Request) => {
  return new Response("Hello, world!");
});

Run your server with the following command:

deno run --allow-net server.ts

This should start a local web server on http://localhost:8000.

Learn more about writing and running Deno programs in the docs.

Additional resources

Contributing

We appreciate your help! To contribute, please read our contributing instructions.