-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More language bindings #142
Comments
CubbyFlow provides APIs to support various languages such as Python, Go, Rust, and C #. If you like, I would like to help you support the Jet framework as well. Before that, I'm building a few repositories that generate code for each language in C++, like pybind11. |
That would be great. What's the priority for those languages? I'm considering either Go or WinRT for the next pick. |
I am considering Python > Go = C# > Rust in order. But others have asked for Kotlin, JavaScript, Lua, and so on. So I'm thinking of implementing these languages as well. |
(Just thinking out loud here) Getting C# binding will be much easier, especially if we use C++/CX (WinRT). Go/Lua binding could be quite challenging due to the difference between C++ and these languages. But if we can come up with C-style (or actual C) wrapper around Jet Framework, that would make Go/Lua binding easier. Kotlin sounds fun, especially for mobile. For JS, it should be more like a porting rather than binding (or wasm?). I'm now leaning toward C# and pure C wrapper (for Go and Lua) for the first pick, but let's keep the discussion continue for a while before we hear more opinions. |
First, I tried to use pybind11 to support the Python API. However, my code didn't use pybind11 because I used C++17 features. Therefore, we are creating pybind17 which supports it. Similarly, we are creating gobind17 and rustbind17. Of course this is not an easy challenge, but I will try to implement it once. |
Update: I recently started working on CubbyFlow to support the C# API. In order to support cross-platform, I am working on binding using a library called CppSharp (https://github.com/mono/CppSharp). If I get a good result, I'll also work on the Jet framework and get a pull request. |
Amazing news! Thanks for the update, @utilForever. If we can have C# API alongside with Python API, it would be extremely useful. |
Update: I apologize for the delay in responding to implementation. |
@utilForever , no problem at all. Welcome back from the training. |
Update: I tried to use CppSharp to generate C# or C++/CLI code, but I decided not to use it because I had difficulty using it for various reasons. Instead, I started to write my own C++/CLI code and implement it for use in C#. As a result, I saw the possibility. I've implemented the Frame class for testing, and I've found success in a C# unit test project. I'll implement C++/CLI code for the rest of the code. https://github.com/utilForever/CubbyFlow/blob/master/Includes/API/CSharp/Animation/Frame.h NOTE: C++/CLI currently supports only the Windows platform. If you want to support cross-platform, I need to consider other methods such as .NET Core(P/Invoke and COM Interop). Alternatively, try using CppSharp again. I wonder if the C# API is okay on the Windows platform. (Please note that in .NET Core I must export CubbyFlow as a dll file. For example, https://blog.quickbird.uk/calling-c-from-net-core-759563bab75d) |
@utilForever and I had an offline discussion and decided to revive my old prototype for both C++/CLI and CX. I will create a new branch (let's call it The key requirements would be:
|
I have verified that the |
Yup it is still empty. Porting would take some time. I will post my update once it’s ready :) |
Proof-of-concept code is pushed to
@utilForever please take a look. |
@doyubkim Thanks. I'll look at it. |
This is not an urgent issue, but having additional bindings, such as .NET, Obj-C, Go, Rust, etc, could be fun. Jet used to have some .NET and Obj-C bindings but deprecated due to the complexity of the binding code and negative impact on core Jet implementation. If someone can make contribution to this effort, it would be great.
The text was updated successfully, but these errors were encountered: