Aetherion is the native C++ engine and runtime designed to bridge the gap between classic and modern sandbox simulations. It builds C++ components and exposes a Python extension via nanobind (Python module: _aetherion). This document explains system and Conda deps, how to build, test, and a minimal usage example surfaced as a unit test.
Quick summary
- Python module name:
_aetherion - Recommended Conda env:
aetherion-312 - Build system: CMake (out-of-tree), optional Makefile helpers, Docker for system deps
Table of contents
- Project overview
- System dependencies
- Conda environment
- Build (CMake + Makefile)
- Docker (build environment image)
- Testing and minimal Python example
- Troubleshooting
- Developer notes
Aetherion contains native C++ subsystems (terrain, physics, ecosystem, rendering helpers) and exposes a Python extension built with nanobind as _aetherion. The repo also generates FlatBuffers headers and supports building a world_test native executable.
Install system packages using your distribution's package manager (Ubuntu/Debian example below). Many libraries are required by CMake and for optimal performance:
- build tools:
build-essential,cmake,ninja-build,pkg-config,git - graphics/input:
libsdl2-dev,libsdl2-image-dev,libsdl2-ttf-dev, OpenGL dev headers - concurrency & libs:
libtbb-dev,libeigen3-dev,libboost-all-dev - serialization & db:
libmsgpack-dev,libmsgpack-cxx-dev,liblmdb-dev,sqlite3dev - logging & utils:
libspdlog-dev,libfmt-dev,zlib1g-dev,libblosc-dev - FlatBuffers:
flatc(or build FlatBuffers from source) - OpenVDB: recommended to build from source or install a compatible system package (CMake defaults to
/usr/local/include/openvdband/usr/local/lib/libopenvdb.so)
Ubuntu example (copy/paste):
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config git \
libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libgl1-mesa-dev \
libtbb-dev libeigen3-dev libboost-all-dev libmsgpack-dev libmsgpack-cxx-dev \
liblmdb-dev libspdlog-dev libfmt-dev zlib1g-dev libblosc-dev sqlite3 libsqlite3-devNote: flatc (FlatBuffers compiler) must be available on PATH. The included Dockerfile builds FlatBuffers and OpenVDB when required.
Header-only EnTT and FlatBuffers sources are pinned via vcpkg.json / vcpkg-lock.json (baseline + overrides), built with a full microsoft/vcpkg clone at that baseline (required for the version database). The installer materializes trees under libs/ so CMake does not need to change.
nanobind is cloned from Git at NANOBIND_REF in third_party.lock (not via the vcpkg port), so we avoid pulling the vcpkg python3 dependency chain; this matches the engine’s vendored libs/nanobind layout.
Hybrid (not vcpkg): imgui / implot / ImGuizmo stay as your existing source or snapshots under libs/ (or add them the same way you always have). Only EnTT + FlatBuffers use vcpkg for version locking.
# From aetherion/ — requires: git, cmake, ninja, curl
./scripts/install_third_party_libs.shCaches default next to the repo: .vcpkg (tool clone + checkout), .vcpkg_cache, .vcpkg_installed. Override with VCPKG_ROOT, VCPKG_CACHE_ROOT. For CI binary artifacts directory, set VCPKG_BINARY_SOURCES (see workflow).
Use the provided environment.yml to create the Conda environment used for building/testing. The project expects CONDA_PREFIX to be set or a named env matching the expected path.
Recommended steps:
# create env (one-time)
conda env create -f environment.yml
# activate env
conda activate aetherion-312
# verify python + numpy + nanobind are available
python -c "import sys, numpy; print(sys.version, numpy.__version__)"Notes:
- CMake looks for
CONDA_PREFIXto setCMAKE_PREFIX_PATH. If you use a different env name or custom prefix, exportCONDA_PREFIXor setPREFIX_PATH/.env(see Makefile) before running CMake. - Some projects historically used
life-sim-312— preferaetherion-312for the engine to avoid confusion.
Primary build method (recommended): from the aetherion/ directory, run:
make build
This wrapper runs the package build in the aetherion-312 Conda environment and is the easiest, repeatable way to produce the Python package/extension.
Prefers out-of-source builds. PREFIX_PATH (or CONDA_PREFIX) should point to your conda environment root so CMake finds Python, NumPy and other conda-installed libs.
Minimal CMake flow:
# set prefix if not using CONDA_PREFIX
export PREFIX_PATH="$CONDA_PREFIX" # or set to your conda env path
cmake -S . -B build -DCMAKE_PREFIX_PATH="$PREFIX_PATH"
cmake --build build --parallelTo build with Ninja and skip the world_test (Makefile helper does this):
rm -rf build
mkdir build && cd build
cmake -G Ninja -DBUILD_WORLD_TEST=OFF -DCMAKE_PREFIX_PATH="$PREFIX_PATH" ..
ninja
cd ..Makefile shortcuts (run from aetherion/):
make build— runsconda run -n aetherion-312 python -m build(Python packaging step)make build-test— configures with Ninja and runspytest testsmake build-and-install— runsscripts/build_and_install.sh(wrapping preferred install flow)make install-package/make conda-install— local copy-based installation helpers (legacy)
Important CMake notes:
nanobind_add_module(_aetherion MODULE ...)builds the_aetherionextension- FlatBuffers schemas are compiled at build time;
flatcmust be present on PATH - OpenVDB paths default to
/usr/local; adjustOPENVDB_INCLUDE_DIRandOPENVDB_LIBRARIESvia CMake cache or environment if your OpenVDB is installed elsewhere
The included Dockerfile creates an Ubuntu-based image that builds OpenVDB and FlatBuffers and creates the Conda env aetherion-312. It is useful when system packages are hard to satisfy locally.
OpenVDB is expensive to build from source, so CI publishes a reusable base image containing OpenVDB under /usr/local. The main CI base image then builds “on top of” this OpenVDB image, which keeps rebuilds fast when OpenVDB hasn’t changed.
- OpenVDB base Dockerfile:
Dockerfile.openvdb - CI base Dockerfile:
Dockerfile(usesARG OPENVDB_BASE_IMAGE=...thenFROM ${OPENVDB_BASE_IMAGE})
Local workflow (from repo root):
# 1) Build the OpenVDB base image (one-time or when OpenVDB build inputs change)
docker build -f Dockerfile.openvdb --target openvdb-runtime -t aetherion-openvdb:openvdb-11.0.0 .
# 2) Build the CI/dev base image on top of OpenVDB
docker build -f Dockerfile -t aetherion-ci:local .Optional: reuse the cached OpenVDB base image from GHCR (skips the expensive local OpenVDB build):
docker build -f Dockerfile . \
--build-arg OPENVDB_BASE_IMAGE=ghcr.io/arthurmoreno/aetherion-openvdb:openvdb-11.0.0 \
--progress=plainBuild and run the image (from repo root):
docker build -f Dockerfile -t aetherion-dev:latest .
docker run -it --rm aetherion-dev:latestInside the container the aetherion-312 env will be available and active (the Dockerfile configures the shell to activate it).
Run local automated tests + badge refresh (canonical command):
make test-badgesThis runs tests with coverage (coverage.xml, htmlcov/), records the latest local test status (.test_status), and regenerates local README badges under _images/.
Quick fallback (tests only):
# config + run tests
make build-test
# canonical local test command (coverage + status marker)
make test-ci
# or from within an activated env and after building the extension
pytest testsMinimal unit test (verifies the nanobind module imports). Add this file as tests/test_aetherion_import.py:
# tests/test_aetherion_import.py
def test_import_aetherion():
import importlib
_aetherion = importlib.import_module("_aetherion")
# basic smoke checks
assert _aetherion is not None
assert hasattr(_aetherion, "__name__")This simple test ensures the compiled extension is importable from the active Python environment. Replace the attribute assertion with any known exported symbol when available (e.g. initialize, EntityInterface, etc.).
- CMake fatal error "Could not detect a conda environment": ensure
CONDA_PREFIXis set or activate your conda env before running CMake. flatc compiler not found: install FlatBuffers or build it from source; ensureflatcis onPATH.- OpenVDB: if you see missing OpenVDB headers/libs, build OpenVDB from source (Dockerfile demonstrates this) or install a distro/system package and set
OPENVDB_INCLUDE_DIRandOPENVDB_LIBRARIESaccordingly. - libstdc++ compatibility: if you encounter runtime symbol/version issues, avoid downgrading libstdc++ globally — prefer isolating by using the Conda environment or the Docker image.
- Naming ambiguity: the repo contains references to
lifesimcore(packaging stubs) and the built module is_aetherion. Decide on the canonical packaging name for release (see Developer notes).
- Stub generation: CMake emits
_aetherion.pyiusingnanobind_add_stub. The Makefile also contains agenerate-stubsrule forlifesimcore.pyiusingnanobind.stubgen. - The Makefile contains legacy copy-based install helpers (
install-package,conda-install) — consider refactoring to a proper wheel/pip flow (python -m build,pip install dist/*.whl). - The build generates FlatBuffers headers in the build tree (
generated/) — keep those in the build directory and do not commit generated headers.
# create & activate env
conda env create -f environment.yml
conda activate aetherion-312
# out-of-source cmake build
cmake -S . -B build -DCMAKE_PREFIX_PATH="$CONDA_PREFIX"
cmake --build build --parallel
# run python tests
pytest tests
# run local automated test + badge refresh
make test-badges
# docker (if system deps fail locally)
docker build -f aetherion/Dockerfile -t aetherion-dev:latest .
docker run -it --rm aetherion-dev:latest- Confirm the canonical Python package name (should the pip/wheel be
aetherionorlifesimcore?). - Confirm OpenVDB preferred install strategy (system package vs build-from-source). If you want I can add step-by-step OpenVDB build instructions.
- Provide a representative exported symbol from
_aetherionto include a concrete example usage (beyond import smoke test).
If you want I will:
- Add the
tests/test_aetherion_import.pyfile to the repo and runpytestlocally (if you want me to run tests here, confirm the environment to use). - Replace legacy Makefile install steps with a
pip installwheel workflow.
Which of those should I do next?

