Files
fn-serverless/examples/tutorial/hello/rust/README.md
Chad Arimura f97ac83255 more tutorial
2017-05-25 14:31:22 -07:00

589 B

Using rust with functions

The easiest way to create a function in rust is via cargo and fn.

Prerequisites

First create an epty rust project as follows:

cargo init --name func --bin

Make sure the project name is func and is of type bin. Now just edit your code, once done you can create a function.

Creating a function

Simply run

fn init --runtime=rust <username>/<funcname>

This will create the func.yaml file required by functions, which can be built by running:

fn build

Testing

fn run