nyan icon indicating copy to clipboard operation
nyan copied to clipboard

Integraton into non-c++ languages

Open SlashScreen opened this issue 9 months ago • 4 comments

Nyan seems to rely on std::shared_ptr; is it possible to create a wrapper around nyan that can be used via the C ABI with other languages as a dynamic library?

SlashScreen avatar Mar 13 '25 21:03 SlashScreen

Yes, should be possible. What for would you like to use nyan (what game/application and what language)?

TheJJ avatar Mar 14 '25 23:03 TheJJ

I was working on some bindings for Odin for an RTS project. I might end up going with Godot and I am making a Godot wrapper as we speak, but I would certainly be open to working on Odin bindings again. It would also help for Zig as well, and any other language that relies on the C ABI.

SlashScreen avatar Mar 14 '25 23:03 SlashScreen

I fear I don't have time or motivation to do this myself, but contributions are welcome!

TheJJ avatar Mar 16 '25 23:03 TheJJ

That's ok, I would be willing to take a crack at it at some point. I tried myself already, but I ran into problems figuring out how to deal with shared pointers and c++ strings in the non-c++ context, sicne Nyan seems to be reliant on that a lot.

SlashScreen avatar Mar 20 '25 03:03 SlashScreen