Skip to content

Nuwa Build

Zero-configuration build system for compiling Nim code into Python extensions.

Overview

Nuwa Build is a zero-configuration build system for compiling Nim code into Python extensions with sensible defaults and minimal configuration.

Key Features

  • Zero Configuration - Works out of the box
  • Multi-file Projects - Compile multiple Nim files into a single extension
  • Flexible Configuration - Configure via pyproject.toml or CLI
  • PEP 517/660 Compatible - Build wheels and source distributions
  • Cross-Platform CI - GitHub Actions with manylinux support
  • Editable Installs - pip install -e . support
  • Watch Mode - Auto-recompile on file changes
  • Auto Dependencies - Automatically install Nimble packages
  • Testing Support - Includes pytest in project template
  • Jupyter Support - Compile Nim code directly in notebooks

Requirements

  • Python: CPython 3.10–3.14 (see the support matrix)
  • Nim: Compiler must be installed and in PATH
  • nimpy / nuwa_sdk: Installed automatically from nimble-deps (new projects pin nimpy@0.2.1 and nuwa_sdk@0.4.4)

Watch mode and Jupyter magics are optional:

pip install "nuwa-build[watch]"
pip install "nuwa-build[notebook]"

Installation

# Install Nuwa Build
pip install nuwa-build

Quick Start

# Create a new project
nuwa new my_project
cd my_project

# Compile (debug build)
nuwa develop

# Compile (release build)
nuwa develop --release

# Run the example
python example.py

# Run tests
pytest

Next Steps