Hello, I watched the Jetbrains talk and wondered where to start on using the code gen system on other libraries. I would love to have Entt.net become a thing?
I think the main issue is that Entt uses C++ templates so it might just be that a code generator needs to be built that outputs C++ classes which tie directly into Entt and then call a C# function
so the state of our generator stack right now is a bit variable. assuming the base knowledge from the webinar:
BuildTools is currently quite finicky to get working, but when it does work it can bind pure C APIs quite well. When it doesn't work, however, the errors aren't very obvious and you end up spending 15 minutes just tweaking specific settings until it works. BuildTools is not intended for general consumption.
It also doesn't cope well with very C++-like APIs, such as templated APIs (which are entirely impossible to bind without writing more C++) or C++ functions which are mangled in inconsistent ways
That, coupled with the artform that is ECS design, would lead me to suggest you're probably better off making an entirely C# ECS implementation, as they tend to be designed such that memory is laid out in a specific way (usually sequentially) which would be thrown off by managed-to-native transitions and other CLR specifics (you lose the benefits of a lot of the optimizations made in the library you're using)
With Entt I'd be sending over structs back and forth with can be expensive but if they are limited to being blittable I would think it's just a memcopy? or is that to naïve?
for fully blittable P/Invokes DllImport is marginally faster, but that's only because it's baked into the runtime and as such has the function pointer baked into the assembly rather than having to do a lookup like we do
At the moment I'm just trying to get an idea of the steps involved in making the whole thing (or at least covering the basic ECS functionality) and then I'll start this little project early January
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity - GitHub - sschmid/Entitas-CSharp: Entitas is a super fast Entity Component System (ECS) Framework...
I actually really like it because it's super simple to use. It's changed since the original 2019 release to something much better if that's what your basing your opinion on?