How to generate Lua boilerplate with D
beza1e1.tuxen.de
beza1e1.tuxen.de
https://tour.dlang.org/tour/en/gems/uniform-function-call-sy...
In particular, here is another explanation of the scope feature presented in the LuaD article:
extern "C" { void foo(); }
For D? That way you'd be able to use the LuaJIT ffi. That, in combination with what's in the OP, would be killer. extern (C++) int foo(int i, int j, int k);
In fact, D can both access C++, and C++ can access D, as you can see further down that link, on classes.But, if you don't want C++, then [1]:
extern (C) int foo(int i, int j, int k);
Which is actually in the article. extern(C) { void foo(); }
https://dlang.org/spec/interfaceToC.htmlhttps://jugad2.blogspot.in/2016/09/calling-simple-c-function...