This example project shows how to write native extensions using C++, C# and Zig.
- C++
- Stable
- Zig
- Experimental support
- The current state of the Zig toolchain is not stable, and may be updated at any time.
- Used an experimental C API for Defold
- C#
- Experimental support
- Based on DotNet 9 with AOT compilation
- Generated from an experimental C API for Defold
The project is also designed to test performance of the different languages.
To build with certain setup, you can use a command line such as:
LOOPCOUNT=1000000 VARIANT=debug SERVER=http://localhost:9000 ./scripts/build_feature.sh arm64-android cpp
- The
LOOPCOUNTis used to control how many loops the performance tests should run. - The
cppcontrols which language to add. Lua is always part of the tests.- Possible values are
cpp,csharp,zigandall
- Possible values are
See the and for a full list of environment variables (BOB, SERVER etc)