Azure Functions for Rust
The Azure Functions for Rust crate supports creating Azure Functions with Rust.
The following Azure Functions trigger bindings are supported:
The following Azure Functions input bindings are supported:
The following Azure Functions output bindings are supported:
Eventually more bindings will be implemented, including custom binding data.
Example
Start by installing the Azure Functions for Rust SDK:
Create a new Azure Functions for Rust application:
&&
Azure Functions are implemented by applying a #[func]
attribute to a Rust function.
For example, let's create src/functions/hello.rs
that implements a HTTP triggered function:
use func;
use ;
Export the Azure Function by changing src/functions/mod.rs
to:
pub const FUNCTIONS: & = export! ;
Run the application with cargo func run
:
The above Azure Function can be invoked with http://localhost:8080/api/hello?name=Peter
.
The expected response would be Hello from Rust, Peter!
.