use 1.17.0 release of openwhisk-runtime-go (#28)

1 file changed
tree: c4c7ddf247f3af60f33e04d4bc090bfa5b57833d
  1. .asf.yaml
  2. .gitattributes
  3. .gitignore
  4. .scalafmt.conf
  5. .travis.yml
  7. LICENSE.txt
  8. NOTICE.txt
  10. build.gradle
  11. core/
  12. example/
  13. gradle/
  14. gradlew
  15. gradlew.bat
  16. settings.gradle
  17. tests/
  18. tools/

Apache OpenWhisk Runtime for Rust

License Build Status

Give it a try today

To use as a Docker action:

wsk action update myAction --docker openwhisk/action-rust-v1.34

The file looks like:

extern crate serde_json;

use serde_derive::{Deserialize, Serialize};
use serde_json::{Error, Value};

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
struct Input {
    #[serde(default = "stranger")]
    name: String,

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
struct Output {
    body: String,

fn stranger() -> String {

pub fn main(args: Value) -> Result<Value, Error> {
    let input: Input = serde_json::from_value(args)?;
    let output = Output {
        body: format!("Hello, {}",,

The action is mainly composed by a main function that accepts a JSON serdes Value as input and returns a Result including a JSON serde Value.

Managing dependencies

If your action needs external dependencies, you need to provide a zip file including your source and your cargo file with all your dependencies. The folder structure is the following:

|- Cargo.toml
|- src

Here is an example of a Cargo.toml file

name = "actions"
version = "0.1.0"
authors = ["John Doe <john@doe.domain>"]
edition = "2018"

serde_json = "1.0"
serde = "1.0"
serde_derive = "1.0"

Once you have all your code zipped in a file with the showed folder structure you can generate your action with the following command:

wsk action create yourAction /full_path_to/ --docker openwhisk/action-rust-v1.34