Skip to content

qnzhou/nanobind_example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nanobind_example

CI status
pip builds Pip Action Status
wheels Wheel Action Status

This repository contains a tiny project showing how to create C++ bindings using nanobind and scikit-build-core. It was derived from the corresponding pybind11 example project developed by @henryiii.

Installation

  1. Clone this repository
  2. Run pip install ./nanobind_example

Afterwards, you should be able to issue the following commands (shown in an interactive Python session):

>>> import nanobind_example
>>> nanobind_example.add(1, 2)
3

CI Examples

The .github/workflows directory contains two continuous integration workflows for GitHub Actions. The first one (pip) runs automatically after each commit and ensures that packages can be built successfully and that tests pass.

The wheels workflow uses cibuildwheel to automatically produce binary wheels for a large variety of platforms. If a pypi_password token is provided using GitHub Action's secrets feature, this workflow can even automatically upload packages on PyPI.

License

nanobind and this example repository are both provided under a BSD-style license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

About

A nanobind example project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 89.6%
  • C++ 6.6%
  • Python 3.8%