{
  "id": "deno",
  "title": "Deno",
  "lang": "en",
  "source_lang": "en",
  "summary": "Deno is an open-source JavaScript and TypeScript runtime combining restricted system access, web-standard APIs, integrated development tools, and Node.js compatibility.",
  "category": "computer-science",
  "subcategory": "software",
  "type": "product",
  "aliases": [
    "Deno runtime"
  ],
  "generated_at": "2026-11-06",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/deno/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/deno/",
      "json": "https://aiwiki.page/zh/deno.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Deno is an open-source runtime for executing JavaScript, TypeScript, and WebAssembly outside a web browser. Created by Ryan Dahl, who also created Node.js, it combines a language execution engine with networking, filesystem access, development tools, and a permission system that restricts access to many host resources by default. Its principal implementation uses Rust and the V8 JavaScript engine. The core runtime is distributed under the MIT license.\n\nDeno is both a platform for running programs and an attempt to simplify the surrounding JavaScript development environment. Formatting, linting, testing, dependency management, and executable packaging are available through its command-line interface rather than necessarily requiring separate tools. Its APIs emphasize compatibility with browser standards, while its later development has placed increasing importance on running existing Node.js applications and using packages from the npm ecosystem.\n\nThe project’s development illustrates a broader tension in software engineering: a runtime can introduce cleaner defaults and stronger restrictions, but adoption also depends on interoperability with established software. Deno’s progression from its initial announcement in 2018 to the 2.0 release in 2024 reflects a movement from a deliberately distinct execution environment toward a combination of distinctive defaults and extensive ecosystem compatibility."
    },
    {
      "heading": "Origins and major releases",
      "text": "Ryan Dahl publicly introduced Deno at JSConf EU in June 2018 during a presentation titled “10 Things I Regret About Node.js.” The presentation revisited decisions made during Node.js’s early development, including its security model, build system, module resolution, and relationship with browser APIs. Deno was presented as an opportunity to reconsider those decisions rather than as an incremental version of Node.js. Its name is an anagram of “Node.”\n\nThe initial prototype differed substantially from the later production runtime. Early work used Go for parts of the implementation, while subsequent development adopted Rust and the Tokio asynchronous runtime. These implementation changes accompanied a more stable separation between JavaScript execution, host operations, and command-line tooling. The project retained V8, the engine also used by Node.js and Chromium, but built a different set of runtime interfaces around it. Shared use of an engine did not imply compatibility between the two environments’ system APIs.\n\nDeno 1.0 was released on 13 May 2020. Its central features included restricted host access, direct support for TypeScript source files, ECMAScript modules, URL-based dependencies, and built-in development tools. The release established a stable foundation for the public runtime interface, although individual experimental features continued to evolve. In its early positioning, Deno deliberately avoided several Node.js conventions, including reliance on CommonJS modules and an automatically managed local node_modules directory for ordinary projects.\n\nSubsequent releases increasingly addressed the practical cost of that separation. Direct npm package support arrived during the 1.x series, and compatibility with Node.js built-in modules expanded. The JSR package registry, introduced in 2024, supplied another component of the ecosystem: a registry designed around modern JavaScript modules and TypeScript, rather than only the historical conventions of npm. JSR was designed to serve more than one runtime, so it is not simply a private package store for Deno.\n\nDeno 2.0, released on 9 October 2024, made compatibility with existing JavaScript projects a central objective. It expanded support for package.json, npm dependencies, CommonJS, and workspace-based development. The importance of the release was therefore not a change in JavaScript syntax or a replacement execution engine, but a shift in the relationship between Deno and the surrounding ecosystem. Projects could adopt its tooling or runtime with fewer immediate changes to their dependency structure, while new projects could continue to use Deno-specific configuration and security defaults."
    },
    {
      "heading": "Runtime architecture and execution",
      "text": "Deno’s architecture separates language execution from the facilities provided by the host environment. V8 parses and executes JavaScript, performs just-in-time compilation, and manages JavaScript memory through garbage collection. Deno supplies the module loader, system interfaces, permission checks, and supporting services. This distinction matters because JavaScript itself does not define how to open a local file, listen on a network port, or launch another program. Those capabilities belong to the runtime’s application programming interface, not to the language alone.\n\nThe host implementation is largely written in Rust. Its asynchronous infrastructure uses Tokio, which coordinates nonblocking input and output and schedules supporting work. JavaScript calls into host functionality through internal operations, often called ops. A filesystem operation, for example, can pass from a JavaScript API through a Rust operation to the underlying operating system. When the operation is asynchronous, completion is reflected back into JavaScript through a promise. This arrangement lets the runtime expose familiar language-level abstractions while using native facilities underneath.\n\nDeno follows an event-loop execution model. Within a JavaScript isolate, ordinary JavaScript execution proceeds on a main thread, while network activity, timers, and other asynchronous operations can make progress without occupying that thread continuously. This is concurrency, but it does not mean that every JavaScript function runs in parallel. A long, CPU-intensive loop can still delay other work in the same isolate. Web Workers provide a way to execute JavaScript in separate isolates, with communication based primarily on messages and explicitly shareable objects.\n\nAn isolate is a V8 execution environment with its own JavaScript heap. It is not equivalent to a separate operating-system process, nor is it by itself a complete security boundary for every possible embedding. Deno also exposes lower-level components, including the deno_core Rust crate, which applications can use to embed JavaScript execution and define custom host operations. An embedded application does not automatically acquire all the APIs, tooling, or permission behavior of the standard Deno command-line program; these depend on the components its developer incorporates.\n\nPerformance depends on the whole execution path rather than the choice of runtime name alone. V8’s optimization behavior, data movement between JavaScript and native code, network implementation, dependency initialization, and application design all affect results. Asynchronous input and output can support many simultaneous connections, but it does not eliminate CPU costs or memory limits. Comparisons with other runtimes therefore require defined workloads, runtime versions, operating systems, and measurement methods rather than a single universal speed ranking."
    },
    {
      "heading": "Language support and web-platform interfaces",
      "text": "Deno executes JavaScript according to the capabilities of its bundled V8 version and supports modern ECMAScript modules. These modules use import and export declarations, allowing dependencies to be identified and linked before normal evaluation. Top-level await permits asynchronous initialization at module scope. Unlike a browser, Deno can load modules from local files and several package sources; unlike traditional Node.js resolution, its original module model did not depend on implicitly searching directories for a package’s entry file.\n\nTypeScript support means that Deno accepts TypeScript source files directly and performs the transformations required to execute them. It does not mean that TypeScript types exist as enforceable runtime objects. Type annotations are generally removed before execution, so a declared parameter type does not automatically validate data received from a network request or configuration file. Type checking and execution are separate operations: deno check performs static checking, while an ordinary deno run invocation does not perform a full type check by default.\n\nThis separation illustrates the distinction between a type system and runtime validation. A TypeScript declaration can help detect incompatible uses of a value during development, but external input can still violate the assumptions expressed by that declaration. Deno also supports JavaScript projects that use type information through JSDoc annotations. The particular TypeScript version and transformation behavior are tied to the installed Deno release, which makes runtime version selection relevant to projects using recently introduced language features.\n\nA substantial part of Deno’s public interface follows the web platform. Examples include fetch, Request, Response, URL, TextEncoder, AbortController, Web Streams, and Web Crypto. These APIs allow portions of application code to move between browsers and server environments with fewer changes. A function that accepts a Request and returns a Response, for instance, can express application-level HTTP behavior without depending entirely on a runtime-specific request object. Standards alignment does not imply that Deno provides a browser’s document rendering environment: the ordinary runtime has no browser window or full document object model.\n\nFacilities without suitable browser equivalents appear principally under the Deno namespace. These include filesystem operations, process creation, environment access, and server facilities such as Deno.serve. WebAssembly supplies another execution path for code compiled from languages such as C or Rust. A WebAssembly module instantiated inside Deno can perform computation and call functions explicitly provided through its imports. Its access to files or networks depends on those host interfaces; WebAssembly does not independently bypass Deno’s permission checks or acquire operating-system access merely by being loaded."
    },
    {
      "heading": "Permissions and security boundaries",
      "text": "Deno’s security model restricts many sensitive host capabilities unless they are granted explicitly. A program normally cannot freely read arbitrary files, write to the filesystem, open network connections, inspect environment variables, launch subprocesses, or call native libraries. Command-line permissions such as --allow-read, --allow-write, --allow-net, and --allow-env enable the corresponding operations. This model applies the principle of least privilege to a developer-facing runtime: an application can receive only the categories of access needed for its task.\n\nPermissions can often be scoped rather than granted globally. A process can receive read access to a particular directory, network access to specified hosts, or access to selected environment variables. For example, deno run --allow-read=./data main.ts grants reading within the specified filesystem scope without also granting general network or write access. When an operation lacks authorization, the runtime can request permission interactively in supported circumstances or reject the operation. Automated environments commonly disable prompts so that missing permissions produce a predictable failure instead of waiting for input.\n\nThe permission boundary generally surrounds the executing application, not every imported package separately. If a process has permission to read a directory, dependency code running in that process ordinarily shares that authority. Consequently, Deno’s restrictions do not establish comprehensive per-package capability isolation. They can reduce the damage caused by a compromised dependency when the application has narrowly scoped permissions, but they do not make every dependency safe. The same distinction applies to network access: permission to contact a host does not determine whether information sent to it is appropriate.\n\nSeveral capabilities can substantially expand what code can do. Permission to launch a subprocess allows execution of programs whose behavior is governed by the operating system rather than by Deno’s JavaScript-level checks. Foreign function interface access permits calls into native libraries, which can operate outside the normal safety assumptions of managed JavaScript. The --allow-all option disables the usual permission restrictions. These features are useful for system integration, but their meaning differs from narrowly permitting an application to read a configuration file.\n\nDeno’s model is therefore best understood in terms of a defined threat model, not as a guarantee that arbitrary code is harmless. It does not provide universal limits on CPU time, memory allocation, or all forms of resource exhaustion. Loading dependencies also has its own security implications, distinct from an application’s later network operations. Stronger isolation for mutually untrusted workloads can require separate processes, operating-system controls, containers, or virtual machines. Deno’s permissions are one layer of defense in depth, with effectiveness determined by the granted authority and the surrounding execution environment."
    },
    {
      "heading": "Modules, registries, and dependency reproducibility",
      "text": "Deno originally emphasized explicit module specifiers, including relative paths and HTTPS URLs. A module could import a dependency directly from a remote location rather than first invoking a separate package installation command. The runtime retrieved dependencies and stored them in a local cache for reuse. This model made a module’s origin visible in its import declaration, but also raised familiar dependency-management questions: whether a remote resource would remain available, whether its contents could change, and how an application could be reproduced without relying on live remote services.\n\nA URL identifies a resource; it does not by itself guarantee immutability or reliability. Pinning a dependency to a versioned path is useful only to the extent that the hosting system preserves the corresponding content. Deno’s lockfile records dependency resolution and integrity information so that unexpected changes can be detected. A cached dependency reduces repeated downloading, but a cache is not identical to a complete archived build environment. Reproducibility also depends on the runtime version, configuration, native components, and any external tools invoked during development or deployment.\n\nModern Deno supports several dependency sources. The npm: scheme identifies packages from the npm ecosystem, while jsr: identifies packages in JSR. The latter registry emphasizes ECMAScript modules, TypeScript source, generated documentation, and compatibility across JavaScript environments. Deno’s standard library is distributed as separately versioned packages under the @std scope on JSR. These packages provide utilities such as assertions and path handling; they are distinct from APIs built directly into the runtime and can evolve on their own release schedules.\n\nProject configuration commonly uses deno.json or deno.jsonc, with the latter allowing comments. An imports configuration can map short names to specific package versions or other module locations. This applies the idea of an import map: application code can import a stable project-local name while the configuration determines its actual destination. Workspace configuration supports repositories containing multiple related packages. Deno also understands package.json, allowing dependency and script conventions from existing Node.js projects to coexist with Deno configuration.\n\nDependency management in Deno consequently offers several workflows rather than one mandatory arrangement. Some projects use a runtime-managed cache without a conventional local node_modules tree; others use a local dependency directory because frameworks, native components, or existing tooling require it. Package installation scripts deserve particular attention because they can execute code rather than merely retrieve source files. Deno treats such scripts more restrictively than a model that automatically executes all dependency hooks. Lockfiles, scoped permissions, controlled installation behavior, and local dependency storage address different parts of the software supply-chain security problem and are not interchangeable guarantees."
    },
    {
      "heading": "Compatibility with Node.js and existing applications",
      "text": "Node.js compatibility is important because the established JavaScript server ecosystem includes far more than language syntax. Applications rely on built-in modules, package metadata, module resolution rules, process behavior, filesystem conventions, native extensions, and command-line tools. Sharing V8 makes Deno and Node.js similar at the JavaScript execution level, but it does not automatically reproduce these higher-level interfaces. Deno implements compatibility layers to supply many of them while preserving its own runtime architecture.\n\nBuilt-in Node.js modules can be addressed with specifiers such as node:fs, node:path, and node:buffer. Deno provides implementations for many such interfaces, enabling packages written for Node.js to perform familiar operations. The compatibility layer also covers significant parts of Node.js’s process and module environment. Host operations remain subject to Deno’s permission system where applicable: importing a filesystem module does not by itself grant unrestricted access to local files. This distinction allows familiar APIs and different authorization defaults to coexist.\n\nModule format is another major compatibility issue. The older CommonJS system loads modules through require and exports values through objects such as module.exports; ECMAScript modules use language-level imports and exports. The two systems differ in loading behavior, dependency analysis, and interactions with asynchronous initialization. Deno’s early emphasis was on ECMAScript modules, but later releases added broader CommonJS support. Deno 2 also strengthened the role of package.json and familiar filename and package-type conventions when interpreting existing projects.\n\nPackages containing native code create additional constraints. Deno supports Node-API, an interface intended to let native add-ons interact with a JavaScript runtime without depending on many engine-specific implementation details. Nevertheless, a native package may require a local node_modules layout, a compatible compiled binary, appropriate permissions, or installation steps. Add-ons that depend directly on undocumented Node.js internals or specific V8 interfaces present different challenges. Compatibility with a package’s JavaScript entry point therefore does not necessarily imply compatibility with its complete installation and native execution path.\n\nCompatibility is consequently a matter of documented interfaces and tested behavior rather than an absolute property. A library using standard JavaScript and ordinary Node.js APIs has a different migration profile from an application that inspects runtime internals or assumes particular lifecycle hooks. Deno’s development has reduced many barriers to using existing frameworks, but differences in permissions, environment handling, dependency installation, and runtime-specific APIs remain observable. Cross-runtime projects often isolate these differences behind small platform-specific modules while sharing their application logic and web-standard request and response handling."
    },
    {
      "heading": "Integrated development tools and project workflows",
      "text": "Deno distributes a substantial development toolchain through one executable. This reduces the need to assemble separate packages for common project tasks, although external tools remain usable. The integrated approach also ties tool behavior to the selected Deno release: updating the runtime can update its formatter, linter, dependency handling, and test infrastructure together. A project can therefore specify a runtime version as an important part of its development environment, rather than coordinating independent versions of every tool.\n\ndeno fmt formats supported source and configuration files according to a consistent style, while deno lint detects selected programming mistakes and problematic patterns. Formatting concerns layout; linting concerns rules about code structure and behavior. Neither is equivalent to a proof of correctness. deno check separately performs TypeScript checking, including supported checking workflows for JavaScript. These distinctions allow projects to run lightweight editing tools frequently and place more expensive or stricter checks in automated validation.\n\nThe built-in test runner executes tests registered through Deno.test. It supports asynchronous tests, filtering, and nested test steps, and can collect coverage information. Its sanitizers help identify cases where a test leaves resources or asynchronous operations unfinished. For example, a test that opens a listener and fails to close it can otherwise contaminate later tests or keep the process alive. Test execution is also subject to permissions, so a unit test with no filesystem requirements need not receive the same authority as an integration test that reads fixtures or starts a server.\n\ndeno bench provides benchmarking facilities, while task definitions in project configuration collect repeatable commands under names invoked through deno task. Tasks can run Deno subcommands or external programs; they are orchestration mechanisms rather than a universal build system. The language server supports editor features such as diagnostics, completion, navigation, and formatting. Integration with an editor matters particularly for imports from multiple registries and URLs, where a generic JavaScript setup may not understand Deno’s module resolution or available global APIs.\n\nThe toolchain also includes documentation generation, a read–evaluate–print loop, and debugging support based on V8’s inspector facilities. Together these tools support a workflow in which source inspection, testing, and execution share the same understanding of project configuration. In continuous integration and delivery pipelines, common checks include formatting verification, linting, type checking, and tests as separate stages. Their separation makes failures easier to interpret: a formatting violation, a static type error, and a failing runtime assertion describe different properties of a program and require different forms of investigation."
    },
    {
      "heading": "Server applications, distribution, and deployment",
      "text": "Deno is used for HTTP services, command-line programs, automation, and applications that benefit from sharing JavaScript or TypeScript across client and server code. Its built-in server API, Deno.serve, accepts a request handler that returns a Response or a promise for one. This interface aligns server application code with web-standard objects. Routing, authentication, database access, and application-specific validation remain separate concerns, usually handled by application code or libraries rather than supplied automatically by the runtime.\n\nA small HTTP service illustrates the relationship between functionality and authority. A server that returns generated text needs permission to listen on the intended network address but may require neither filesystem access nor access to environment variables. Adding a database driver or reading a secret from the environment changes those requirements. The resulting service architecture therefore involves two descriptions: what the program does through its APIs, and which host capabilities its execution environment permits. These descriptions can evolve independently as features are added.\n\nDeno can distribute applications through source-based execution or through deno compile, which creates a standalone executable containing the runtime and application code. This is packaging, not ordinary ahead-of-time conversion of every JavaScript function into a small native program with no runtime dependency. The resulting executable includes the machinery needed to execute the application, which affects its size and operational behavior. Dynamic imports, external assets, native libraries, and target-platform differences can still require explicit handling; packaging does not make every external dependency disappear.\n\nDeno Deploy is a related hosted platform rather than another name for the command-line runtime. Its execution and operational model is designed for hosted services and has its own supported interfaces and restrictions. Code written around web-standard requests, responses, and streams can be easier to move between such environments, but access to local files, subprocesses, network destinations, or persistent state depends on the deployment platform. Hosted execution should therefore be distinguished from running the Deno binary on a conventional server with direct control over the process and filesystem.\n\nOperational characteristics depend on application design and deployment conditions. Streaming responses can reduce buffering requirements, while blocking computation can delay request handling within an isolate. Database connection limits, external service latency, startup work, and load balancing can matter more than a runtime-level microbenchmark. Applications with strict compatibility requirements may prioritize established Node.js behavior; applications emphasizing integrated tooling, TypeScript execution, or restricted host access may place greater weight on Deno’s defaults. In either case, deployment testing must exercise the actual dependencies, permissions, workload, and target environment rather than treating runtime selection as a substitute for those measurements."
    }
  ],
  "links": [
    "open-source-software",
    "javascript",
    "web-browser",
    "software-engineering",
    "garbage-collection",
    "application-programming-interface",
    "operating-system",
    "event-loop",
    "concurrent-computing",
    "process-computing",
    "central-processing-unit",
    "ecmascript-modules",
    "type-system",
    "hypertext-transfer-protocol",
    "least-privilege",
    "capability-based-security",
    "virtual-machine",
    "defense-in-depth",
    "uniform-resource-locator",
    "cybersecurity",
    "authentication",
    "load-balancing"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}