-
Notifications
You must be signed in to change notification settings - Fork 563
Investigate viability of Swig replacing binding generation process #1657
Comments
Lack of operator support isn't too big of an issue, given that math types should really just be mapped to C# equivalents with some efficient way of marshalling the underlying data. I can't imagine there would be too many other use cases. Multiple inheritance and virtual methods would be a much bigger issue. |
what about starting with something minimal to see if there's no important drawback or if there's a chance we'll get stuck behind a wall ahead (e.g. multiple inheritance). If I understand correctly, I don't think the virtual methods will be a problem, it's just a matter of adding them to a blacklist isn't it? |
Totally. There must be a workaround, though i did not look for it that hard.
More like whitelist. Basically just add extra line for classes that are supposed to be inherited and have virtual methods. This is non-issue, just something to keep in mind.
As i understand it should produce one managed lib and one native lib. |
Yesterday i moved work forward a bit, integrating it into build system and wrapping some extra stuff. Ofc it does not build due to some errors. Not too many so that is good. |
We should investigate viability of Swig replacing binding generation process. Swig is old and well maintained tool supporting multiple languages. Primary concern is c#, but it also opens doors for easy support of some other languages should they be considered in the future (python/java/go/etc).
I started experimenting with swig, my work can be viewed here: https://github.com/rokups/Urho3D/tree/feature/swig
Things to consider:
String
/WString
should be mapped to native c# containers and data types.System.Numerics
.GetX
/SetX
need to be converted to properties in order to match current .NET API as closely as possible.The text was updated successfully, but these errors were encountered: