I need a little help if possible.
I would like to deploy Swift code to Bluemix OpenWhisk. Not only main.swift with 2 swift lines on main function, but a real "swift package" with dependencies.
I tried to compile my main.swift with dependencies with docker, but i’m not familiar with docker. It doesn’t work.
Do you have any documentation or tutorial for that ?
Thank you.
Answer by Paul Castro (61) | May 19, 2017 at 11:02 AM
OpenWhisk doesn't support full Swift Package at this time.
There are two options that might get you closer to what you need:
Zip files: you can create an action from multiple Swift source code files by zipping up the code and using the CLI command wsk action update myAction myAction.zip --kind swift:3
. One caveat, "main.swift" is reserved in the current implementation of our Swift runtime so don't include a main.swift in the zip file. It will be ignored.
precompiled binary: it is possible to pre-compile a Swift action locally using Docker as described here . This will use the stock Package.swift in the OpenWhisk Swift runtime. There is one developer who has looked at customizing this path to allow a custom Package.swift , but there is nothing officially supported.
Using Microsoft SQL Server in Kitura 1 Answer
How can I call my OpenWhisk action from HTTP? 1 Answer
What happened to swift documentation? 0 Answers