42 个开发者工具,始终保持最新 — 上游每次发布后数小时内即可通过 apt 获取。 加入 Discord

📅 自 起,使用本 apt 镜像将需要订阅。 查看价格

🇿 安装最新的 Zig 在 Debian 上

获取最新的 Zig programming language packages

最新版本:0.16.0 · 更新于 2026-07-08
来源版本
deb.griffo.io0.16.0 ✅
官方 Debian🚫 未收录
← 返回首页
📌 在特定发行版本上安装? Debian 12 (bookworm) · Debian 13 (trixie) · Debian 14 (forky) · Debian Sid

什么是 Zig?

Zig is a general-purpose programming language and toolchain designed for maintaining robust, optimal, and reusable software. Created by Andrew Kelley, Zig aims to be a better alternative to C, offering modern language features while maintaining the simplicity and performance that systems programmers need.

🚀 Why Latest Versions Matter: Zig is rapidly evolving with significant performance improvements, new language features, and critical bug fixes in each release. The latest 0.16.0 includes major enhancements like improved cross-compilation, faster compilation times, and enhanced debugging capabilities.

🔥 Key Features of Zig

⚡ Simple & Fast

No hidden control flow, no hidden memory allocations, no preprocessor. Focus on debugging your application, not your language knowledge.

🔧 Comptime Magic

Compile-time code execution and lazy evaluation. Call any function at compile-time and manipulate types as values without runtime overhead.

🌐 Cross-Compilation

Built-in cross-compilation support for dozens of targets. No external dependencies needed for most platforms.

🔄 C/C++ Interop

Use Zig as a drop-in C/C++ compiler with better cross-compilation. Incrementally adopt Zig in existing codebases.

🚀 始终领先于官方软件源:Debian 和 Ubuntu 在发布时会冻结软件包版本——本仓库通常在上游发布后数小时内即发布新版本。只需 apt upgrade 即可始终保持最新版本。

📦 从 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 update
install -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 update

步骤 2:安装 Zig

# Install current stable Zig
sudo apt install zig

# Or install nightly builds for cutting-edge features
sudo apt install zig-master
# Install current stable Zig
apt install zig

# Or install nightly builds for cutting-edge features
apt install zig-master

🎯 基本使用示例

Create a new project:

# Create and enter project directory
mkdir my-zig-project && cd my-zig-project

# Initialize new Zig project
zig init

# Build and run
zig build run

Compile a single file:

# Create hello.zig
echo 'const std = @import("std");
pub fn main() void {
    std.debug.print("Hello, Zig!\n", .{});
}' > hello.zig

# Compile and run
zig run hello.zig

Use as C compiler:

# Compile C code with Zig
zig cc -o program program.c

# Cross-compile for different targets
zig cc -target x86_64-windows -o program.exe program.c

🚀 为什么选择 deb.griffo.io?

⚠️ Official Debian Lag: Official Debian repositories often contain outdated Zig versions that may be months or even years behind the latest release, missing critical features and performance improvements.

📦 软件包构建仓库

Debian 软件包在这些 GitHub 仓库中自动构建和维护:

🔗 相关软件包

也可从 deb.griffo.io 获取:

🎯 Perfect for: Systems programming, game development, embedded systems, performance-critical applications, and anyone wanting a modern alternative to C with better safety and tooling.

📦 本仓库最近发布

❓ 常见问题

Zig 在官方 Debian 软件源中吗?

不在 — 官方 Debian 源没有打包 Zig。本仓库目前是唯一的 apt 来源,提供 Zig 0.16.0。

如何在 Debian 上安装最新版 Zig?

按上方说明一次性添加 deb.griffo.io 仓库,然后运行:sudo apt install zig-stable。之后通过常规的 sudo apt upgrade 获取新版本。

软件包是否有签名?如何构建?

每个软件包都使用仓库的 GPG 密钥(EA0F721D231FDD3A0A17B9AC7808B4DD62C41256)签名,并基于上游发布在公开的 GitHub 仓库中构建,任何人都可以审查。

支持哪些 Debian 版本?

Debian 12 Bookworm、Debian 13 Trixie、Forky 和 Sid。