Skip to main content

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

Reason this release was yanked:

partial upload, will be unyanked later

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ziglang-0.15.2-py3-none-macosx_12_0_arm64.whl (93.0 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

File details

Details for the file ziglang-0.15.2-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 acae2a9ce67ed249ad68d42c21bc73b5f9d51a33ba5ea42f609f78683e8d9bb7
MD5 9da80cbcd44290188ee7d3c1b7f14bf9
BLAKE2b-256 d72e42c49a5b539a595ff5f2293de0bd339636875e44b4c69f51470bdf1d599d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page