Sharing code across Swift OpenWhisk actions -
i'm trying out openwhisk actions in swift. better or worse, of openwhisk documentation javascript. when writing actions in javascript, looks can package code npm module , require/import action. swift, there's no indication there's way share code. found 1 sample project (https://github.com/swiftontheserver/drinkchooser inestimable @rob-allen) uses clever trick of pre-processing source code files before building them:
cat actions/_common.swift actions/myaction.swift > build/myaction.swift
is there official way share code across actions?
many thanks.
building swift binaries locally , creating actions binaries allow this. swift's package manager generate multiple executables if have correct directory layout.
this example project uses serverless framework build , deploy multiple binaries openwhisk actions.
creating actions swift sources files not support providing multiple sources files code sharing.
Comments
Post a Comment