Skip to main content

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

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 Distributions

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

ziglang-0.15.2-py3-none-win_arm64.whl (89.7 MB view details)

Uploaded Python 3Windows ARM64

ziglang-0.15.2-py3-none-win_amd64.whl (94.1 MB view details)

Uploaded Python 3Windows x86-64

ziglang-0.15.2-py3-none-win32.whl (96.1 MB view details)

Uploaded Python 3Windows x86

ziglang-0.15.2-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl (94.1 MB view details)

Uploaded Python 3manylinux: glibc 2.31+ riscv64musllinux: musl 1.1+ riscv64

ziglang-0.15.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.musllinux_1_1_s390x.whl (99.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390xmusllinux: musl 1.1+ s390x

ziglang-0.15.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl (99.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64lemusllinux: musl 1.1+ ppc64le

ziglang-0.15.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl (91.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7lmusllinux: musl 1.1+ ARMv7l

ziglang-0.15.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (90.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64musllinux: musl 1.1+ ARM64

ziglang-0.15.2-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl (93.5 MB view details)

Uploaded Python 3manylinux: glibc 2.12+ x86-64musllinux: musl 1.1+ x86-64

ziglang-0.15.2-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl (97.3 MB view details)

Uploaded Python 3manylinux: glibc 2.12+ i686musllinux: musl 1.1+ i686

ziglang-0.15.2-py3-none-macosx_12_0_x86_64.whl (97.0 MB view details)

Uploaded Python 3macOS 12.0+ x86-64

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-win_arm64.whl.

File metadata

  • Download URL: ziglang-0.15.2-py3-none-win_arm64.whl
  • Upload date:
  • Size: 89.7 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for ziglang-0.15.2-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 a81ebfc61e1b7aa43a33add23f93b98954d757434f894eb21bd40b176b6688aa
MD5 d93352ea64dc63da6e30ce7fd4a57932
BLAKE2b-256 1eb4dec7e1b867ce3640f9bba9204f8ea658f6ca5161350e92b76bf17aeffb9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ziglang-0.15.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 94.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for ziglang-0.15.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ca80dc9c70dbdfdd9ee51d000de3501a95d33d9782ab9ab9b56f700484ebcd83
MD5 c1b069d19bad1c40fc1c99586184325f
BLAKE2b-256 b96b8ab0853a312108b4089747486366b824b5da89773cb56f661f9994de17db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ziglang-0.15.2-py3-none-win32.whl
  • Upload date:
  • Size: 96.1 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for ziglang-0.15.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 b174f7ebb9d1f2210d32d1420333120f6117ebee3de8b3e221e6ebb0c3beec4b
MD5 1dd317ddfde4a5131e986d0d0988f9e3
BLAKE2b-256 5704e54964be82dce7b9a5708a8a5f345d373bc78c558c0712e6e356593292ec

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl
Algorithm Hash digest
SHA256 d3fe40825e18238e986b305cbf3a4d93a50461b893339e31c81b0d6c73f33937
MD5 8fc502420112b1cc57ba8b92676e5b71
BLAKE2b-256 b5da2e6655300a3174bd6299c06da577b0cb14685058d9b00b61042cf9d9e38b

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.musllinux_1_1_s390x.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.musllinux_1_1_s390x.whl
Algorithm Hash digest
SHA256 978ebcc3c6c9624cbc999dd8dcb65427e7474650d9709a889aace8e325705ce2
MD5 81a0f7705c4883f577809dfd121be019
BLAKE2b-256 7b5d5690870969ed52501deaa4c722c476279a00d2c034ef7f82cf778507c3fd

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl
Algorithm Hash digest
SHA256 85faefbd4cfe420de92aaa8f8300bec2b9afe8d1f1d8c5abf71bf92754682536
MD5 bfc33bc833539573a55c89e55a072429
BLAKE2b-256 57ef09d2baf722521d3878b8e17d3ee6271f02c7ef7ec398bbd059fa6466a5e6

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 ad43a4692311512ab55cc918596c814ff44fb811b1299fa9a57cc4e2bf315c6b
MD5 4ab212ed3f1238377fc0ceef0d88cc63
BLAKE2b-256 cfbab85879ff883f152e2278852d3f8af37924badefaabb38d89e62a5d066b40

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 edc0aa60ec964a4cf462d40f68d7de242ddf37fd9a80f2afaee6397059463230
MD5 f09585361b0bb8c9d7a027ab9f14b174
BLAKE2b-256 537d8c277208250ffa72f12a10f52dfc1d45850f08244093065b40c5f4628260

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 806316453d1ede7174ed3fefb8e5348154629089c3bb5fe812dfd0e172fac130
MD5 0841564e500b9076f4cd15d3ea87dd20
BLAKE2b-256 db81f9f5c7fd68d80b8edff2a641a1c95ac4125356387d298374227040b8e1e8

See more details on using hashes here.

File details

Details for the file ziglang-0.15.2-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 04eb9c4135ef431487b920c73312cd3a5e754019839024eeed3521772d1585a2
MD5 562deae2011648f0a03b6d82f5e691aa
BLAKE2b-256 0a13006c26f2dc7510385dc549eb44983402e4539519d48567d9a6b0ae71adc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ziglang-0.15.2-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 47af4f85e3e59bd672126cc026d3a01b516cad24b9a9ea075abfe8532f4c6bc1
MD5 36566bae7a0239908ba4f9d2dbcdf38d
BLAKE2b-256 c4c7151df628321266a38da133d481c5e929bd36d9d0424e8c2b7a9c4964c172

See more details on using hashes here.

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