Skip to content

feat(core-nanobind-shared): add nanobind + shared library sample#76

Merged
henryiii merged 2 commits into
mainfrom
core-nanobind-shared
Jul 3, 2026
Merged

feat(core-nanobind-shared): add nanobind + shared library sample#76
henryiii merged 2 commits into
mainfrom
core-nanobind-shared

Conversation

@henryiii

@henryiii henryiii commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Adds the example requested in scikit-build/scikit-build-core#1034: a nanobind extension module that links against an ordinary C++ shared library (add_library(... SHARED ...)) shipped inside the wheel.

The README and CMake comments cover the parts the issue thread flagged as non-trivial: relative install() destinations, $ORIGIN/@loader_path RPATH so the extension finds the library next to itself, and Windows handling (DLL next to the .pyd, MSVC import library excluded from the wheel).

Wired into hello_list in noxfile.py, so it is tested and dist-built on all three CI platforms. Verified locally on macOS: wheel contains only the package files, RPATH checks out with otool, and the wheel imports from a clean venv.

henryiii added 2 commits July 2, 2026 23:35
Adds the example requested in scikit-build/scikit-build-core#1034: a
nanobind extension module linked against a plain C++ shared library
shipped inside the wheel, covering relative install destinations,
$ORIGIN/@loader_path RPATH, and Windows DLL/import-library handling.

Assisted-by: ClaudeCode:claude-fable-5
Generalizes the free-threading job into a package matrix so the
shared-library wheel goes through auditwheel/delocate repair in CI.

Assisted-by: ClaudeCode:claude-fable-5
@henryiii henryiii merged commit 6e1ddcf into main Jul 3, 2026
14 checks passed
@henryiii henryiii deleted the core-nanobind-shared branch July 3, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant