什么是 Deno?
Deno is a secure JavaScript and TypeScript runtime built on V8 and Rust, created by Ryan Dahl (the original creator of Node.js). It runs TypeScript natively without a compilation step, has secure-by-default sandboxing, and implements modern web standard APIs. Deno 2 brings full Node.js and npm compatibility.
🔥 Key Features of Deno
⚡ Blazing Fast
Built on V8 engine with Rust, offering excellent performance for JavaScript and TypeScript workloads.
🔒 Secure by Default
No file, network, or environment access unless explicitly granted. Fine-grained permission system.
📝 TypeScript Native
Run TypeScript files directly without any compilation step or configuration required.
🌐 Web Standard APIs
Implements browser-compatible APIs like fetch, WebSockets, and Streams out of the box.
🔄 Node.js Compatible
Deno 2 supports Node.js APIs and npm packages for seamless migration.
📦 Built-in Toolchain
Includes formatter, linter, test runner, bundler, and documentation generator.
📦 从 deb.griffo.io 安装
步骤 1:添加仓库
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt updateinstall -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt updatesudo apt install extrepo
sudo extrepo enable griffo
sudo apt update🆓 有一个永久免费的镜像。 deb-free.griffo.io 永久免费提供软件包 — 无需账号、无需订阅,最多落后上游 2 个月,安全修复立即发布。目前收录 cliamp、Ghostty、lazydocker、Oh My Posh 和 Zed;Deno 不在其中,因此今天只能通过上面的仓库安装 — 提出请求即可将其加入。
🧩 关于 extrepo 选项。 extrepo 是 Debian 官方用于管理第三方仓库的工具:它会替你写好 sources 文件并安装签名密钥,并在使用前先对照签名元数据校验该密钥。本仓库以 griffo 之名登记其中,永久免费镜像则为 griffo-free,因此在 Debian(bookworm、trixie、forky、sid)上,上面的命令就是全部配置。
extrepo 只负责 sources 文件和密钥,订阅凭据仍然要写入 /etc/apt/auth.conf.d/deb.griffo.io.conf。Ubuntu 不在覆盖范围内,因为 extrepo 只发布 Debian 各套件的元数据:在 Ubuntu 上请使用 sudo 或 root 的命令。
📋 可用的 Deno 软件包
deb.griffo.io provides two different Deno packages to suit different needs:
Full Deno runtime with all developer tooling including the REPL, LSP, formatter, linter, test runner, and bundler. This is the recommended choice for most developers.
sudo apt install denoapt install denoLightweight Deno runtime without the developer tooling. Ideal for production deployments where you only need to run compiled Deno programs with minimal overhead and a smaller binary footprint.
sudo apt install denortapt install denort🔄 Managing Both Packages
You can install both deno and denort simultaneously:
Install both:
sudo apt install deno denortapt install deno denortCheck deno version:
deno --versionCheck denort:
denort --version步骤 2:安装 Deno
sudo apt install denoapt install deno步骤 3:验证安装
deno --version
deno --help🚀 Quick Start Examples
Run TypeScript directly:
echo 'console.log("Hello from Deno!")' > app.ts
deno run app.tsRun with permissions:
deno run --allow-net --allow-read app.tsCreate a new project:
deno init my-deno-app
cd my-deno-app
deno run main.tsRun with npm packages:
import { express } from "npm:express@4";
deno run --allow-net server.tsRun tests:
deno testFormat and lint:
deno fmt
deno lint📦 Package Build Repository
Debian 软件包在此 GitHub 仓库中自动构建和维护:
- 🦕 deno-debian - Latest release builds
🔗 Related Packages
Enhance your development workflow with these complementary tools from deb.griffo.io:
- Bun JavaScript Runtime - Fast all-in-one JavaScript runtime
- Zig Programming Language - Systems programming language
- uv Python Manager - Fast Python package manager
- Ghostty Terminal - Fast terminal emulator