Azure Functions for Rust
The Azure Functions for Rust crate supports creating Azure Functions with Rust.
The following Azure Functions trigger bindings are supported:
- Blob trigger
- Cosmos DB trigger
- Event Grid trigger
- Event Hub trigger
- Generic trigger
- HTTP trigger
- Service Bus trigger
- Queue trigger
- Timer trigger
The following Azure Functions input bindings are supported:
The following Azure Functions output bindings are supported:
- Blob output
- Cosmos DB output
- Event Hub output
- Generic output
- HTTP output
- Queue output
- SendGrid email message output
- Service Bus output
- SignalR group action output
- SignalR message output
- Table output
- Twilio SMS message output
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:
&&
Create a HTTP-triggered function:
This generates src/functions/hello.rs
with the following contents:
use ;
Azure Functions are implemented by applying a #[func]
attribute to a Rust function.
Run the application with cargo func run
:
The above Azure Function can be invoked with http://localhost:8080/api/hello
.
The expected response would be Hello from Rust!
.