Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project layout

A minimal alloconda project typically keeps Zig in src/ and Python in python/:

hello_alloconda/
├── build.zig
├── build.zig.zon
├── pyproject.toml
├── python/
│   └── hello_alloconda/
│       └── __init__.py
└── src/
    └── root.zig

Notes:

  • build.zig and build.zig.zon are generated by alloconda init.
  • src/root.zig defines pub const MODULE = ... and your Zig API surface.
  • python/hello_alloconda/ is the Python package directory. The CLI copies the compiled extension here and writes __init__.py.
  • pyproject.toml provides Python metadata and build backend configuration.

If you keep Python sources outside python/, pass --package-dir to the CLI or set tool.alloconda.package-dir in pyproject.toml.

If you prefer a different Zig source layout, update build.zig to point at your new root.zig path.