¿Qué es 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.
🔥 Características principales de 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.
🆕 Novedades en Zig 0.16.0
- E/S como Interfaz: Todas las E/S ahora requieren una instancia
Io, habilitando backends con hilos, eventos y asíncronos - Async y Cancelación: Concurrencia de tareas integrada con Futures y Groups, más cancelación estandarizada en todas las operaciones de E/S
- Nuevos Builtins de Metaprogramación:
@Typereemplazado por builtins específicos (@Int,@Struct,@Union,@Enum, etc.) para código genérico más limpio - Compresión Deflate Nativa: Deflate integrado con rendimiento comparable a zlib y APIs de descompresión simplificadas
- Mejores Trazas de Pila: Desenrollado seguro de pila en casi todas las plataformas con mejor información de depuración y soporte de llamadores inline
- Soporte de Plataformas Ampliado: 8+ nuevas arquitecturas en CI incluyendo aarch64-freebsd, loongarch64, powerpc64le y s390x
📦 Instalación desde debian.griffo.io
Paso 1: Agregar repositorio
This repository uses reprepro, which is configured to keep only the latest version of each package. This means older builds are replaced when a new release ships — you cannot pin a specific version with
apt install zig=0.15.2 after 0.16.0 has been published.To let users keep a previous release installed alongside the current one, packages are now named by stability tier:
zig— meta-package, always pulls inzig-stablezig-stable— current stable release (e.g. 0.16.0)zig-oldstable— previous stable release (e.g. 0.15.2), installable alongsidezig-stablezig-0— deprecated, installzig-stableinstead
zig-stable and zig-oldstable register with update-alternatives
so you can switch the active /usr/bin/zig at any time.⬆️ Actualización a 0.16.0: Si tiene
zig-0 instalado de la estructura de paquetes anterior, debe eliminarlo primero:Paso 2: Instalar Zig
🎯 Ejemplos de uso básico
Create a new project:
Compile a single file:
Use as C compiler:
🚀 ¿Por qué elegir debian.griffo.io?
- ✅ Always Latest: Get Zig 0.15.2 immediately, not months later
- ✅ Nightly Builds: Access cutting-edge features with zig-master package
- ✅ Automatic Updates: Packages updated within hours of upstream releases
- ✅ Proper Dependencies: Correctly packaged with all required dependencies
- ✅ Multi-Distribution: Works on Bookworm, Trixie, and Sid
- ✅ Zero Hassle: No manual compilation or complex setup required
📦 Repositorio de construcción de paquetes
Los paquetes de Debian se construyen y mantienen automáticamente en estos repositorios de GitHub:
- 🇿 zig-debian (stable) - Stable release builds
- 🇿 zig-master-debian (nightly) - Nightly development builds
🔗 Paquetes relacionados
También disponible desde debian.griffo.io:
- ZLS Language Server - IDE support for Zig
- Ghostty Terminal - Fast terminal emulator
- Yazi File Manager - Terminal file manager