FFIG / ffig

Generate code to call C++ libraries from other languages
MIT License
29 stars 9 forks source link

N21 swift bindings #408

Closed jbcoe closed 6 years ago

jbcoe commented 6 years ago

What does this PR do?

Adds Swift bindings to FFIG.

Closes

closes #21

jbcoe commented 6 years ago

This is still work in progress. I thought a view of live work would be useful.

jbcoe commented 6 years ago

Installing Swift on Ubuntu: https://gist.github.com/Azoy/8c47629fa160878cf359bf7380aaaaf9

jbcoe commented 6 years ago

Swift without Xcode: https://owensd.io/2015/01/13/compiling-swift-without-xcode/

ajbennieston commented 6 years ago

Looks good so far...

jbcoe commented 6 years ago

Progress is blocked, for now, by my inability to understand Swift initialiser overload resolution: https://stackoverflow.com/questions/49978207/why-does-my-swift-code-try-and-call-the-wrong-init-method

[Update]

Question answered and generated bindings fixed!

jbcoe commented 6 years ago

Swift has a command line helper for building/testing much like dotnet: https://theswiftdev.com/2017/11/09/swift-package-manager-tutorial/

https://oleb.net/blog/2017/12/importing-c-library-into-swift/

jbcoe commented 6 years ago

Tests in place (albeit ugly ones).

Will only run on macOS for now. Will amend that in a follow-up PR.