Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Use litgen online

This page shows an example of conversion of C++ code into C++ bindings code and python stubs. You can open it in an online interactive environment (mybinder), where you can edit the code below.

  1. To launch the online tool, click on the rocket icon at the top right of this page, or use this link

  2. The interactive environment will open in a new tab. Wait for it to be ready

  3. Once it is launched, click on “Run Cell” to run each of the cells:

Run cell

You can edit the C++ code as well as the options below. The generated code will be displayed under the cell, once you clicked “Run Cell”. You will then be able to see:

  • The generated python stubs (aka declarations)

  • The generated C++ bindings code for pybind11

  • The generated C++ bindings code for nanobind

  • The generated glue code (if needed)

Loading...