fn icon indicating copy to clipboard operation
fn copied to clipboard

Swift support

Open joshhopkins opened this issue 6 years ago • 7 comments

Would love to see Swift support, including an offical FDK.

joshhopkins avatar Jan 28 '18 02:01 joshhopkins

So, officially Fn supports the following FDKs: java, python, go, node. If you'd like to contribute to Fn by developing FDK for Swift you are welcome. If you'd like to make it official then you'd become the maintainer of that.

denismakogon avatar Jan 29 '18 12:01 denismakogon

Would be great to see this. And if it became official, we'd become the maintainers, but at first would probably start unofficial.

treeder avatar Jan 29 '18 22:01 treeder

@joshhopkins interested in helping with it? It's actually fairly easy to make FDKs.

treeder avatar Jan 29 '18 22:01 treeder

@treeder unfortunately I'm quite low on time currently, but I've put the feelings out to those I know in the server-side Swift community.

joshhopkins avatar Feb 01 '18 08:02 joshhopkins

@treeder I would be willing to help with this. I looked for a doc describing what needs be implemented for an FDK but didn't find one, can anyone point me to this?

kognate avatar Feb 18 '18 17:02 kognate

Here's the docs on the formats it should support: https://github.com/fnproject/fn/blob/e753732bd8642e2bcf81e4b80eb9b8500734ebf7/docs/developers/function-format.md

But probably best way is to look at other implementations, like https://github.com/fnproject/fdk-ruby and https://github.com/fnproject/fdk-node . It's actually pretty straight simple. Couple of notes, it's probably OK to just support a single "hot" format like json (default probably not worthwhile since the FDK doesn't add much value on top).

treeder avatar Feb 19 '18 03:02 treeder

In case anyone is still interested, here is an (unofficial) Swift FDK implementation (initial version). At this point, it doesn't implement all of FDK features, but it does allow you to run Swift programs in a serverless mode. Tested locally and in OCI.

iliasaz avatar Nov 03 '20 18:11 iliasaz