Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Azure Functions for Rust
The Azure Functions for Rust crate supports writting Azure Functions in Rust.
The following Azure Functions trigger bindings are supported:
The following Azure Functions output bindings are supported:
Eventually more bindings will be implemented, including custom binding data.
Examples
Start by creating a new binary package:
Edit Cargo.toml
to include the following dependencies:
= "0.1.2"
= "0.4.2"
Azure Functions are implemented by applying a trigger attribute to a Rust function.
For example, let's create src/greet.rs
that implements a HTTP triggered function by
applying the func
attribute:
# extern crate azure_functions;
# extern crate log;
use func;
use ;
Replace the contents of src/main.rs
with the following to register the function with
the Azure Functions Host:
extern crate log;
extern crate azure_functions;
// The main! macro generates an entrypoint for the binary
// Expects a list of Azure Functions to register with the Azure Functions host
main!
Run the application with the --create <root>
option, where <root>
is the path to
the desired Azure Functions application root directory:
Run the Azure Functions Host:
The above Azure Function can be invoked with http://localhost:5000/api/greet?name=John
.
The expected response would be Hello from Rust, John!
.