3 releases

0.1.2 Dec 30, 2025
0.1.1 Dec 29, 2025
0.1.0 Dec 26, 2025

#1716 in Asynchronous

Apache-2.0

2MB
42K SLoC

Armature Azure Functions

Azure Functions runtime adapter for Armature applications.

This crate allows you to deploy Armature applications to Azure Functions with HTTP triggers.

Quick Start

use armature::prelude::*;
use armature_azure_functions::{AzureFunctionsRuntime, init_tracing};

#[controller("/")]
struct HelloController;

#[controller_impl]
impl HelloController {
    #[get("/")]
    async fn hello() -> &'static str {
        "Hello from Azure Functions!"
    }
}

#[module(controllers: [HelloController])]
struct AppModule;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize tracing for Application Insights
    init_tracing();

    // Create Armature application
    let app = Application::create::<AppModule>();

    // Run on Azure Functions
    AzureFunctionsRuntime::new(app).run().await
}

With Azure Services

use armature_azure_functions::{AzureFunctionsRuntime, init_tracing};
use armature_azure::{AzureServices, AzureConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    init_tracing();

    // Initialize Azure services
    let azure = AzureServices::new(
        AzureConfig::from_env()
            .enable_cosmos()
            .enable_blob()
            .build()
    ).await?;

    // Register in DI container
    let app = Application::create::<AppModule>();
    app.container().register(azure);

    AzureFunctionsRuntime::new(app).run().await
}

Deployment

# Install Azure Functions Core Tools
npm install -g azure-functions-core-tools@4

# Create function app
func init --worker-runtime custom

# Add HTTP trigger
func new --template "HTTP trigger" --name api

# Deploy
func azure functionapp publish <app-name>

Azure Functions Features

This crate helps with:

  • HTTP Triggers: Handle HTTP requests in Azure Functions
  • Application Insights: Structured logging for monitoring
  • Bindings: Access Azure services through bindings
  • Configuration: Read from Azure App Configuration

armature-azure-functions

Azure Functions runtime adapter for the Armature framework.

Features

  • Functions Runtime - Run Armature apps on Azure Functions
  • HTTP Triggers - Handle HTTP events
  • Timer Triggers - Scheduled execution
  • Queue Triggers - Process queue messages
  • Blob Triggers - React to blob changes

Installation

[dependencies]
armature-azure-functions = "0.1"

Quick Start

use armature_azure_functions::AzureFunctionsRuntime;
use armature_core::Application;

#[tokio::main]
async fn main() {
    let app = Application::new()
        .get("/api/hello", |_| async {
            Ok(HttpResponse::ok().with_text("Hello from Azure!"))
        });

    AzureFunctionsRuntime::new(app).run().await;
}

License

MIT OR Apache-2.0

Dependencies

~33–52MB
~1M SLoC