github.com/iron-io/functions@v0.0.0-20180820112432-d59d7d1c40b2/examples/hello/rust/README.md (about)

     1  # Using rust with functions
     2  
     3  The easiest way to create a iron function in rust is via ***cargo*** and ***fn***.
     4  
     5  ## Prerequisites
     6  First create an epty rust project as follows:
     7  ```bash
     8  cargo init --name func --bin
     9  ```
    10  
    11  Make sure the project name is ***func*** and is of type ***bin***. Now just edit your code, once done you can create an iron function.
    12  
    13  ## Creating an IronFunction
    14  Simply run
    15  
    16  ```bash
    17  fn init --runtime=rust <username>/<funcname>
    18  ```
    19  
    20  This will create the ```func.yaml``` file required by functions, which can be built by running:
    21  
    22  ```bash
    23  fn build
    24  ```
    25  
    26  ## Testing
    27  
    28  ```bash
    29  fn run
    30  ```