I'm trying to set up a streamlined development environment for creating an application that has a C++ core and a Python interface. My focus is on using Python 3.13 and C++23, ideally for high-performance computing (HPC) applications. Here's what I've tried so far:
- **Project environment and dependencies**: Pixi
- **Development environment**: WSL2 with VS Code Remote window
- **Build system**: scikit-build using CMake and Ninja
- **Binding library**: Nanobind
I've set up various configuration files including pixi.toml, pyproject.toml, CMakeLists.txt, and CMakePresets.json.
For my Python toolchain, I'm currently using:
- UV
- Ruff
- Mypy (and I'm trying ty)
- pytest
- pre-commit
What are your thoughts on this setup? Would you recommend a toolchain like this, and could you suggest any learning resources? I'm particularly interested in how to effectively develop Python applications with a C++ core.
4 Answers
If C++ isn't a strict requirement, you might check out Maturin for Rust bindings; it's gaining popularity. But I should mention that Rust is still catching up in certain HPC areas like CUDA, PETSc, BLAS, and LAPACK. Are you familiar with how Rust handles these?
Honestly, it sounds like a lot of work to maintain both languages. Have you considered sticking to just one unless it's absolutely necessary?
You're on the right track! One key point to consider is whether you're using Pybind11 or Nanobind for your bindings, as that can significantly affect your development experience and build complexity. What did you decide on?
Your stack looks solid for modern C++/Python integration. If build times become an issue, especially with C++23's heavy template usage, consider looking into Incredibuild. It helps speed up CMake/Ninja builds by distributing compilation across multiple CPUs without altering your current setup.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically