ziglang

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

19 个版本 Python ~=3.5
安装
pip install ziglang
poetry add ziglang
pipenv install ziglang
conda install ziglang
描述

Zig PyPI distribution

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. The ziglang Python package redistributes the Zig toolchain so that it can be used as a dependency of Python projects.

Rationale

Although Zig is useful in itself, the Zig toolchain includes a drop-in C and C++ compiler, zig cc, based on clang. Unlike clang itself, zig cc is standalone: it does not require additional development files to be installed to target any of the platforms it supports. Through zig cc, Python code that generates C or C++ code can build it without any external dependencies.

Usage

To run the Zig toolchain from the command line, use:

python -m ziglang

To run the Zig toolchain from a Python program, use sys.executable to locate the Python binary to invoke. For example:

import sys, subprocess

subprocess.call([sys.executable, "-m", "ziglang"])

Binary wrapper

The ziglang Python package installs a binary wrapper for the Zig compiler under the name python-zig; the name is different to avoid conflicts with any system-wide or user-wide zig binaries that may be already installed.

Using with uv

The Zig compiler distributed in this Python package can be launched by uv without installation:

uvx --from ziglang python-zig

License

The Zig license.

版本列表
0.16.0 2026-04-15
0.15.2 2025-11-10
0.15.1 2025-08-30
0.14.1 2025-05-26
0.14.0 2025-03-17
0.13.0 2024-06-26
0.13.0.post1 2024-11-15
0.12.1 2024-06-26
0.12.0 2024-04-21
0.11.0 2023-08-04
0.11.0.dev3747 2023-06-22
0.10.1.post1 2023-01-23
0.10.0 2022-11-01
0.10.0.post1 2022-12-02
0.9.1 2022-02-15
0.9.0 2021-12-21
0.8.1 2021-09-18
0.8.0 2021-07-12
0.0.0 2021-07-11