-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Welcome to the cppmm wiki! This will ultimately host more filled out documentation, but for now we'll just have a simple tutorial.
This tutorial will walk you through creating binding files using a very simple, header-only target library which we'll extend to add new features to as we need to demonstrate how to bind them.
This assumes you have successfully built cppmm and are currently in a build
directory underneath the main repository directory. If you're working from somewhere else, you'll need to edit the example commands appropriately.
Before we get started, let's take a moment to examine the cppmm architecture. Binding a C++ library is a multi-step process. First we create a binding file, which is a C++ file that describes the classes, methods and functions we want to bind, and how we want to bind them. This is read by our first binary, astgen
, which spits out the AST for the binding interface as JSON. Then asttoc
reads the AST and generates a C library that wraps the C++ API.
-- TODO: DIAGRAM HERE