asbind20: C++20 AngelScript binding library
asbind20 is a C++20 AngelScript binding library powered by templates.
Although the interface of AngelScript is very friendly to C++ comparing to most binding APIs from other script languages, it still needs many additional proxy functions, e.g., when binding a constructor. However, most of these proxies have similar logic, so they can be generated by some template tricks.
Besides, this library provides tools for easily calling a script function, as well as RAII helpers for managing lifetime of AngelScript objects.
In general, this library aims to automate everything that can be generated by template meta-programming.
The name and API design are inspired by the famous pybind11 library.
Core Features
Conveniently bind C++ functions / classes to AngelScript, including auto-generated wrappers for constructors / factories / operators.
Tools for passing arguments to and receiving return value from script functions, without manually choosing the correct function for different types.
Generating generic wrapper for functions of any parameter count at compile-time, without using any macro.
RAII tools for managing lifetime of script objects.
Container for storing script objects.
Extension Library
The extension library was developed for personal project at first, but most of them are general purpose and can be used in other projects. Actually, the whole asbind20 was a submodule of personal project long time ago.
It also contains demonstration for how to register some common types like array or string by asbind20.
License
This library is licensed under the MIT License.
Contents:
Getting Started
Registering Application Interfaces
Using AngelScript Interfaces
Advanced Topics
Extra Resources
Extension Library