6 releases

0.1.6 Jul 21, 2022
0.1.5 Jul 4, 2022
0.1.4 Jun 22, 2022

#748 in Procedural macros

21 downloads per month

Apache-2.0

6KB
60 lines

Openwhisk Rust Macro

Description

This project Openwhisk Rust Macro is a Rust derive macro which implements necessary methods to interact with Openwhisk-rust library to invoke actions deployed in Openwhisk. The Openwhisk Rust Client library requires Rust to be installed onto your local machine.

Setup

Add following libraries.

openwhisk-rust  = "0.1.2"
openwhisk_macro = "0.1.6" 

In your Cargo.toml file of your rust package.

Then access those libraries by importing.

use openwhisk_macro::OpenWhisk;
use openwhisk-rust::*;

Usage

Creates necessary methods to invoke Openwhisk Actions.

#[derive(OpenWhisk)]
#[AuthKey = "Your auth key"]
#[ApiHost = "Host api endpoint url"]
#[Insecure = "true/false"]
#[Namespace = "Your namespace name"]

// Note: Action should be deployed prior,before accessing it. 
pub struct AnyAction {
action_name: String,
// *some fileds //
}

References

License

Licensed under Apache-2.0

Dependencies

~6–19MB
~289K SLoC