r/gameenginedevs • u/No-Foundation9213 • 8h ago
Should I provide a stable C Interface for my Engine?
My engine is written in C++23. It‘s an editor-centric engine like Unity, but I would also like to offer the ability to write custom clients for the engine.
And now I‘m wondering if I should add another layer of abstraction with a common C interface to the engine.
This C interface would bring the benefits of a stable ABI on all platforms, easy bindings for other languages (rather unimportant), and I heard this would make implementing C# scripting way easier, but it would add another layer of function calls and therefore would decrease performance by a tiny bit. Additionally, it would add complexity, of which I‘m not sure if it‘s necessary.
Your input would really help me.