deno README

The project's README from github.com/denoland/deno. As one markdown file: README.md.

Deno

Twitter badge Bluesky 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

Scoop (Windows):

scoop install main/deno

Build and install from source

Complete instructions for building Deno from source can be found 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.

deno (denoland/deno)

Searching Database…

108.7K ·GitHub
这是什么?Deno 是一个运行时,可以运行 JavaScript、TypeScript 和 WebAssembly,它的特点是默认开启安全保护,并且开发体验很好。它基于 V8、Rust 和 Tokio 构建。
这是我要导入的库,还是需要单独安装的程序?它是一个独立的运行时可执行文件,类似 Node.js。你把它安装在自己的电脑上,就可以直接执行 .ts 或 .js 文件,不需要构建步骤。
怎么安装,怎么运行第一个程序?可以通过 shell 脚本(Mac/Linux)、PowerShell(Windows),或者 Homebrew、Chocolatey、WinGet、Scoop 等包管理器安装。然后在 server.ts 之类的文件里写 TypeScript 代码,再用 deno 命令直接运行。
我需要先安装 Node.js 或其他额外工具吗?不需要。Deno 以一个独立的可执行文件发布,可以原生运行 TypeScript,不需要 Node.js、npm,也不需要单独的构建或转译步骤。
如果不下载安装包,而是从源码编译,有什么需要注意的吗?从源码编译是可行的,但它比直接下载安装包要复杂得多,是一条单独的路径。README 没有详细介绍,而是指向了专门的编译说明。
它通常用来做什么?它最常用来构建 Web 服务器,不过也可以运行各类通用的 JavaScript、TypeScript 和 WebAssembly 应用。
Deno 使用哪个包注册中心?Deno 推荐使用 JSR,它被描述为面向现代 JavaScript 和 TypeScript 的开源包注册中心。同时 Deno 还自带标准库,提供常用的工具函数。
除了我自己的电脑,还能把 Deno 应用部署到哪里?官方文档提到了 Deno Deploy,它是 Deno 生态中用于托管 Deno 程序的服务,与运行时本身一起介绍。
README 提到的安全方面是什么?README 说 Deno 具有“安全的默认设置”,也就是说,除非明确授予权限,否则权限是受限的。不过这份 README 摘录没有介绍具体的参数细节。
Deno 本身是用什么语言编写的?Deno 的引擎基于 V8、Rust 和 Tokio 构建,因此 Rust 是这个运行时的核心实现语言。
What are similar projects?wasmer, pdfcraft, zx, sdk-js, liteparse, genact, rollup, scriptc
Creator
denoland
Size
247.5 MB
Stars
108.7K
Age
8y
Commits · 90 Days