# denoland/deno architecture

> Architecture diagram of the GitHub repository denoland/deno, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/denoland/deno
- Repository: https://github.com/denoland/deno

## Overview

Deno is a secure-by-default JavaScript, TypeScript, and WebAssembly runtime, with a CLI and substantial developer tooling. The primary workflow is a user running a program through the CLI, which executes it in the runtime; the README’s web-server example adds HTTP serving as a product capability. The graph also preserves language-server testing, Node compatibility, storage, telemetry, and WebGPU. Relationships are limited to README statements and SOURCE INDEX references; unsampled implementation links are omitted or marked unverified.

Main entry points: [`ext/webgpu/compute_pipeline.rs`](https://github.com/denoland/deno/blob/main/ext/webgpu/compute_pipeline.rs) (Compute pipelines), [`ext/webgpu/render_pipeline.rs`](https://github.com/denoland/deno/blob/main/ext/webgpu/render_pipeline.rs) (Render pipelines), [`ext/http/http_next.rs`](https://github.com/denoland/deno/blob/main/ext/http/http_next.rs) (HTTP processing), [`cli/lsp/testing/server.rs`](https://github.com/denoland/deno/blob/main/cli/lsp/testing/server.rs) (LSP test service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and tooling"]
  node_cli["Deno CLI<br/>[main.rs]"]
  node_run["Run commands<br/>[mod.rs]"]
end

subgraph group_runtime["Runtime and security"]
  node_worker["JavaScript runtime<br/>[worker.rs]"]
  node_permissions["Permission checks<br/>[lib.rs]"]
end

subgraph group_web["Web platform"]
  node_fetch["Fetch and DNS<br/>[lib.rs]"]
  node_http["HTTP serving<br/>[lib.rs]"]
  node_http_engine["HTTP processing<br/>[http_next.rs]"]
  node_compression["Response compression<br/>[compressible.rs]"]
  node_request_body["Request bodies<br/>[request_body.rs]"]
  node_response_body["Response bodies<br/>[response_body.rs]"]
  node_webgpu_compute["Compute pipelines"]
  node_webgpu_render["Render pipelines<br/>[render_pipeline.rs]"]
  node_gpu_layout["Bind group layouts"]
  node_gpu_shader["Shader modules<br/>[shader.rs]"]
  node_gpu_errors["GPU errors<br/>[error.rs]"]
  node_gpu_webidl["WebGPU conversions<br/>[webidl.rs]"]
end

subgraph group_compat["Compatibility and storage"]
  node_node["Node compatibility<br/>[lib.rs]"]
  node_sqlite["Node SQLite<br/>[database.rs]"]
  node_cache[("Runtime cache<br/>[lib.rs]")]
end

subgraph group_dev["Developer services"]
  node_lsp["Language server<br/>[language_server.rs]"]
  node_test_definitions["Test discovery<br/>[definitions.rs]"]
  node_test_execution["Test execution<br/>[execution.rs]"]
  node_test_server["LSP test service<br/>[server.rs]"]
  node_telemetry["OpenTelemetry<br/>[lib.rs]"]
end

node_user(("Program author"))

node_user -->|"runs program"| node_cli
node_cli -.->|"invokes command"| node_run
node_run -.->|"executes program"| node_worker
node_worker -.->|"checks access"| node_permissions
node_user -->|"defines server"| node_http
node_http -->|"dispatches requests"| node_http_engine
node_http_engine -->|"uses compression"| node_compression
node_http_engine -->|"uses request bodies"| node_request_body
node_http_engine -->|"uses response bodies"| node_response_body
node_test_execution -->|"uses definitions"| node_test_definitions
node_test_execution -->|"uses server"| node_test_server
node_test_server -->|"runs tests"| node_test_execution
node_test_server -->|"collects tests"| node_test_definitions
node_node -.->|"provides SQLite API"| node_sqlite
node_webgpu_compute -->|"retrieves layout"| node_gpu_layout
node_webgpu_compute -->|"uses shader module"| node_gpu_shader
node_webgpu_compute -->|"converts descriptors"| node_gpu_webidl
node_webgpu_compute -->|"reports errors"| node_gpu_errors
node_webgpu_render -->|"uses layout"| node_gpu_layout
node_webgpu_render -->|"uses shader module"| node_gpu_shader
node_webgpu_render -->|"converts descriptors"| node_gpu_webidl
node_webgpu_render -->|"reports errors"| node_gpu_errors

click node_cli "https://github.com/denoland/deno/blob/main/cli/main.rs"
click node_run "https://github.com/denoland/deno/blob/main/cli/tools/run/mod.rs"
click node_worker "https://github.com/denoland/deno/blob/main/runtime/worker.rs"
click node_permissions "https://github.com/denoland/deno/blob/main/runtime/permissions/lib.rs"
click node_fetch "https://github.com/denoland/deno/blob/main/ext/fetch/lib.rs"
click node_http "https://github.com/denoland/deno/blob/main/ext/http/lib.rs"
click node_http_engine "https://github.com/denoland/deno/blob/main/ext/http/http_next.rs"
click node_compression "https://github.com/denoland/deno/blob/main/ext/http/compressible.rs"
click node_request_body "https://github.com/denoland/deno/blob/main/ext/http/request_body.rs"
click node_response_body "https://github.com/denoland/deno/blob/main/ext/http/response_body.rs"
click node_lsp "https://github.com/denoland/deno/blob/main/cli/lsp/language_server.rs"
click node_test_definitions "https://github.com/denoland/deno/blob/main/cli/lsp/testing/definitions.rs"
click node_test_execution "https://github.com/denoland/deno/blob/main/cli/lsp/testing/execution.rs"
click node_test_server "https://github.com/denoland/deno/blob/main/cli/lsp/testing/server.rs"
click node_node "https://github.com/denoland/deno/blob/main/ext/node/lib.rs"
click node_sqlite "https://github.com/denoland/deno/blob/main/ext/node_sqlite/database.rs"
click node_cache "https://github.com/denoland/deno/blob/main/ext/cache/lib.rs"
click node_telemetry "https://github.com/denoland/deno/blob/main/ext/telemetry/lib.rs"
click node_webgpu_compute "https://github.com/denoland/deno/blob/main/ext/webgpu/compute_pipeline.rs"
click node_webgpu_render "https://github.com/denoland/deno/blob/main/ext/webgpu/render_pipeline.rs"
click node_gpu_layout "https://github.com/denoland/deno/blob/main/ext/webgpu/bind_group_layout.rs"
click node_gpu_shader "https://github.com/denoland/deno/blob/main/ext/webgpu/shader.rs"
click node_gpu_errors "https://github.com/denoland/deno/blob/main/ext/webgpu/error.rs"
click node_gpu_webidl "https://github.com/denoland/deno/blob/main/ext/webgpu/webidl.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_run toneBlue
class node_worker,node_permissions toneAmber
class node_fetch,node_http,node_http_engine,node_compression,node_request_body,node_response_body,node_webgpu_compute,node_webgpu_render,node_gpu_layout,node_gpu_shader,node_gpu_errors,node_gpu_webidl toneMint
class node_node,node_sqlite,node_cache toneRose
class node_lsp,node_test_definitions,node_test_execution,node_test_server,node_telemetry,node_user toneIndigo
```

## Components

### CLI and tooling

- [Deno CLI](https://github.com/denoland/deno/blob/main/cli/main.rs): `cli/main.rs`
- [Run commands](https://github.com/denoland/deno/blob/main/cli/tools/run/mod.rs): `cli/tools/run/mod.rs`

### Runtime and security

- [JavaScript runtime](https://github.com/denoland/deno/blob/main/runtime/worker.rs): `runtime/worker.rs`
- [Permission checks](https://github.com/denoland/deno/blob/main/runtime/permissions/lib.rs): `runtime/permissions/lib.rs`

### Web platform

- [Fetch and DNS](https://github.com/denoland/deno/blob/main/ext/fetch/lib.rs): `ext/fetch/lib.rs`
- [HTTP serving](https://github.com/denoland/deno/blob/main/ext/http/lib.rs): `ext/http/lib.rs`
- [HTTP processing](https://github.com/denoland/deno/blob/main/ext/http/http_next.rs): `ext/http/http_next.rs`
- [Response compression](https://github.com/denoland/deno/blob/main/ext/http/compressible.rs): `ext/http/compressible.rs`
- [Request bodies](https://github.com/denoland/deno/blob/main/ext/http/request_body.rs): `ext/http/request_body.rs`
- [Response bodies](https://github.com/denoland/deno/blob/main/ext/http/response_body.rs): `ext/http/response_body.rs`
- [Compute pipelines](https://github.com/denoland/deno/blob/main/ext/webgpu/compute_pipeline.rs): `ext/webgpu/compute_pipeline.rs`
- [Render pipelines](https://github.com/denoland/deno/blob/main/ext/webgpu/render_pipeline.rs): `ext/webgpu/render_pipeline.rs`
- [Bind group layouts](https://github.com/denoland/deno/blob/main/ext/webgpu/bind_group_layout.rs): `ext/webgpu/bind_group_layout.rs`
- [Shader modules](https://github.com/denoland/deno/blob/main/ext/webgpu/shader.rs): `ext/webgpu/shader.rs`
- [GPU errors](https://github.com/denoland/deno/blob/main/ext/webgpu/error.rs): `ext/webgpu/error.rs`
- [WebGPU conversions](https://github.com/denoland/deno/blob/main/ext/webgpu/webidl.rs): `ext/webgpu/webidl.rs`

### Compatibility and storage

- [Node compatibility](https://github.com/denoland/deno/blob/main/ext/node/lib.rs): `ext/node/lib.rs`
- [Node SQLite](https://github.com/denoland/deno/blob/main/ext/node_sqlite/database.rs): `ext/node_sqlite/database.rs`
- [Runtime cache](https://github.com/denoland/deno/blob/main/ext/cache/lib.rs): `ext/cache/lib.rs`

### Developer services

- [Language server](https://github.com/denoland/deno/blob/main/cli/lsp/language_server.rs): `cli/lsp/language_server.rs`
- [Test discovery](https://github.com/denoland/deno/blob/main/cli/lsp/testing/definitions.rs): `cli/lsp/testing/definitions.rs`
- [Test execution](https://github.com/denoland/deno/blob/main/cli/lsp/testing/execution.rs): `cli/lsp/testing/execution.rs`
- [LSP test service](https://github.com/denoland/deno/blob/main/cli/lsp/testing/server.rs): `cli/lsp/testing/server.rs`
- [OpenTelemetry](https://github.com/denoland/deno/blob/main/ext/telemetry/lib.rs): `ext/telemetry/lib.rs`

### Other components

- **Program author**

## Connections

- Program author → Deno CLI: runs program
- Deno CLI → Run commands: invokes command
- Run commands → JavaScript runtime: executes program
- JavaScript runtime → Permission checks: checks access
- Program author → HTTP serving: defines server
- HTTP serving → HTTP processing: dispatches requests (evidence: `ext/http/lib.rs`)
- HTTP processing → Response compression: uses compression (evidence: `ext/http/http_next.rs`)
- HTTP processing → Request bodies: uses request bodies (evidence: `ext/http/http_next.rs`)
- HTTP processing → Response bodies: uses response bodies (evidence: `ext/http/http_next.rs`)
- Test execution → Test discovery: uses definitions (evidence: `cli/lsp/testing/execution.rs`)
- Test execution → LSP test service: uses server (evidence: `cli/lsp/testing/execution.rs`)
- LSP test service → Test execution: runs tests (evidence: `cli/lsp/testing/server.rs`)
- LSP test service → Test discovery: collects tests (evidence: `cli/lsp/testing/server.rs`)
- Node compatibility → Node SQLite: provides SQLite API
- Compute pipelines → Bind group layouts: retrieves layout (evidence: `ext/webgpu/compute_pipeline.rs`)
- Compute pipelines → Shader modules: uses shader module (evidence: `ext/webgpu/compute_pipeline.rs`)
- Compute pipelines → WebGPU conversions: converts descriptors (evidence: `ext/webgpu/compute_pipeline.rs`)
- Compute pipelines → GPU errors: reports errors (evidence: `ext/webgpu/compute_pipeline.rs`)
- Render pipelines → Bind group layouts: uses layout (evidence: `ext/webgpu/render_pipeline.rs`)
- Render pipelines → Shader modules: uses shader module (evidence: `ext/webgpu/render_pipeline.rs`)
- Render pipelines → WebGPU conversions: converts descriptors (evidence: `ext/webgpu/render_pipeline.rs`)
- Render pipelines → GPU errors: reports errors (evidence: `ext/webgpu/render_pipeline.rs`)
