swig

Generate bindings between C / C++ code and various high level languages such as Javascript, Python, C#, and more.

TLDR

Generate a binding between C++ and Python

>_ swig -c++ -python -o [path/to/output_wrapper.cpp] [path/to/swig_file.i]
copy

Generate a binding between C++ and Go

>_ swig -go -cgo -intgosize 64 -c++ [path/to/swig_file.i]
copy

Generate a binding between C and Java

>_ swig -java [path/to/swig_file.i]
copy

Generate a binding between C and Ruby and prefix the Ruby module with {{foo::bar::}}

>_ swig -ruby -prefix "[foo::bar::]" [path/to/swig_file.i]
copy

Copied to clipboard
free 100$ digital ocean credit