Skip to main content

Yggdrasil

pyyggdrasil packages the native dependency prefix used by the planning projects in this repository family.

The Python distribution name and import package are both pyyggdrasil.

pyyggdrasil is the base of the planning-and-learning package chain. The shared workspace layout, the layered install order, and the common build-from-source and CMake-integration patterns are documented in the Planning and Learning build instructions; the sections below cover pyyggdrasil-specific details.

Each binary release has a matching complete corresponding-source archive on the GitHub releases page, containing Yggdrasil and its exact native dependency sources.

Python Integration

Install the wheel and query the native prefix:

import pyyggdrasil

print(pyyggdrasil.native_prefix())
print(pyyggdrasil.cmake_prefix())  # prefix to put on CMAKE_PREFIX_PATH
print(pyyggdrasil.cmake_dir())     # directory containing yggdrasilConfig.cmake
print(pyyggdrasil.include_dir())
print(pyyggdrasil.library_dirs())
print(pyyggdrasil.cmake_dirs())

The same paths are available from the shell:

python -m pyyggdrasil --prefix
python -m pyyggdrasil --cmake-dir
python -m pyyggdrasil --include-dir
python -m pyyggdrasil --version

Python packages that consume this native prefix should depend on:

dependencies = [
    "pyyggdrasil>=0.1,<0.2",
]

The bundled shared libraries make the coupling ABI-level, so pin to the same minor version. The exported CMake package version file uses SameMinorVersion compatibility accordingly.

Build Python

Build a wheel from source:

uv build --wheel

The build recreates dependencies-build/ and dependencies-install/ from scratch. To package an existing native prefix without rebuilding dependencies:

YGGDRASIL_BUILD_NATIVE=OFF \
YGGDRASIL_NATIVE_PREFIX=/path/to/dependencies-install \
uv build --wheel

This bypass trusts the prefix as-is; use only one built from the dependency revisions in docs/SOURCES.json.

Native builds use all available processors by default. Set YGGDRASIL_JOBS to override the build parallelism. Set YGGDRASIL_BUILD_TYPE to select the dependency build profile; it defaults to Release.

Runtime libraries are stripped in the wheel by default. Disable that for debugging with:

YGGDRASIL_STRIP_WHEEL=OFF uv build --wheel

Build C++

Native Dependencies

Build the native dependency prefix directly with CMake:

cmake -S src -B dependencies-build \
  -DCMAKE_INSTALL_PREFIX=dependencies-install \
  -DCMAKE_INSTALL_LIBDIR=lib

cmake --build dependencies-build --parallel
cmake --install dependencies-build

Yggdrasil builds its bundled dependencies as shared libraries. The native dependency prefix contains C++ headers, shared libraries, and CMake package configuration files consumed by the other projects.

Yggdrasil Targets

Configure Yggdrasil separately against the installed dependency prefix:

cmake -S . -B build \
  -DCMAKE_BUILD_TYPE=Debug \
  -DYGGDRASIL_NATIVE_PREFIX="$PWD/dependencies-install" \
  -DYGGDRASIL_BUILD_TESTS=ON

cmake --build build --parallel
ctest --test-dir build

CMake options:

Option Default Description
YGGDRASIL_BUILD_TESTS OFF Build Yggdrasil C++ tests.
YGGDRASIL_BUILD_PROFILING OFF Build Yggdrasil benchmark executables.
YGGDRASIL_ENABLE_FMT_FORMATTERS ON Enable Yggdrasil's public fmt formatters.
YGGDRASIL_USE_LLD ON Use LLVM lld with Clang when available.
YGGDRASIL_ENABLE_LTO ON Enable link-time optimization for Release builds.

Single-config CMake builds default to Release. On GCC and Clang, Debug builds use -Og with debug symbols, RelWithDebInfo keeps frame pointers and disables LTO, and Release LTO uses GCC LTO or Clang ThinLTO. Editable installs and wheels disable YGGDRASIL_USE_LLD and YGGDRASIL_ENABLE_LTO by default for build reliability. This compiler policy applies only to Yggdrasil's first-party extension and tests; the src/ dependency superbuild leaves each bundled project in control of its own compiler policy.

CMake Integration

The wheel ships a CMake package config (yggdrasilConfig.cmake) defining the yggdrasil::yggdrasil interface target. It carries the include directory, C++20 as a compile feature, and the bundled dependencies (Boost, fmt, gtl, TBB) via find_dependency. (cista is consumed through the include directory only — its target exports compile definitions that would otherwise change cista's hashing and fmt integration.) Downstream CMake projects consume it through CMAKE_PREFIX_PATH:

cmake -S . -B build \
  -DCMAKE_PREFIX_PATH="$(python -m pyyggdrasil --prefix)"
find_package(yggdrasil 0.1 CONFIG REQUIRED)
target_link_libraries(my_target PRIVATE yggdrasil::yggdrasil)

For compiler invocations launched from Python, use pyyggdrasil.include_dir() for the C++ headers and pyyggdrasil.library_dirs() for installed native library directories.

MPI

The wheel includes a TCP/shared-memory MPICH runtime and Boost.MPI. MPI remains opt-in and is not linked by yggdrasil::yggdrasil:

find_package(yggdrasil CONFIG REQUIRED)
set(MPI_HOME "${YGGDRASIL_NATIVE_PREFIX}")
set(MPI_CXX_SKIP_MPICXX ON)
find_package(MPI REQUIRED COMPONENTS CXX)
find_package(Boost CONFIG REQUIRED COMPONENTS mpi serialization
    PATHS "${YGGDRASIL_NATIVE_PREFIX}" NO_DEFAULT_PATH)
target_link_libraries(distributed PRIVATE
    MPI::MPI_CXX Boost::mpi Boost::serialization)

The launcher is ${YGGDRASIL_NATIVE_PREFIX}/bin/mpiexec, or from Python, pyyggdrasil.native_prefix() / "bin" / "mpiexec". Use the bundled launcher and libraries together; vendor interconnects and vendor MPI require a separate source build.

fmt Formatters

Yggdrasil's public fmt::formatter specializations are guarded by the YGG_ENABLE_FMT_FORMATTERS macro, which defaults to 1 (yggdrasil/core/config.hpp). Consumers can opt out by defining YGG_ENABLE_FMT_FORMATTERS=0. For Yggdrasil's own builds, the YGGDRASIL_ENABLE_FMT_FORMATTERS CMake option (default ON) toggles the macro.

Release files for pyyggdrasil 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyyggdrasil 0.1.1
File Size Uploaded
pyyggdrasil-0.1.1.tar.gz 219.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyyggdrasil 0.1.1
File Interpreter ABI Platform
pyyggdrasil-0.1.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
pyyggdrasil-0.1.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 70.5 MB

Release files / pyyggdrasil-0.1.1.tar.gz

Download URL pyyggdrasil-0.1.1.tar.gz
Size 219.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d8b75d19d08e0a0f125f74481c9e9bb6ee5248e427e2dd4ca42645078b9f5766
BLAKE2b-256 checksum
How to use checksums
6ec7077ee654c83a455826f00251a89c07057374642903527dc6589775dbaefe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / pyyggdrasil-0.1.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pyyggdrasil-0.1.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 36.3 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
30531fe1cf2ce6dc61f3ac087c8863176bb313a91a31717dae84689107f427ab
BLAKE2b-256 checksum
How to use checksums
7c141b784fe073b25d19e1488e362d96fa2af90c96a1976d8f8aec12ce35f974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / pyyggdrasil-0.1.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL pyyggdrasil-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Size 34.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
afbebb9239bc99fe77f3f3b397b6f8fe478eb6c53136b2117bad055b8ed58f33
BLAKE2b-256 checksum
How to use checksums
2805c95705f5764ddae75a686df8b9482d8c56fcef771c3b0603e38c4460245b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.4

3 release files

0.2.3

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

3 release files

This release

0.1.1 This release

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page