Skip to main content

Crate rustlift

Crate rustlift 

Source
Expand description

§Rustlift

A typestate-driven deployment agent for Azure Web Apps.

Rustlift automates the full lifecycle of deploying the Rust Axum server to Azure App Service:

  1. Authenticate against the Azure CLI session.
  2. Provision a Resource Group, App Service Plan, and Web App.
  3. Cross-compile via cross targeting x86_64-unknown-linux-musl.
  4. Deploy the zip artefact and verify the /health endpoint.

§Architecture — the Typestate Pattern

The pipeline enforces a strict progression through compile-time states:

Init ──▸ Authenticated ──▸ InfraReady ──▸ ArtifactReady ──▸ Live

Each transition consumes the previous state and produces the next. Invalid call sequences are compile-time errors, not runtime panics.

Why is this useful?

In most deployment tools, forgetting a step (e.g. deploying before building) results in a confusing runtime error deep in the call stack. The typestate pattern shifts that validation to compilation time. If the code compiles, the call order is correct.

§Module Overview

ModulePurpose
errorsTyped error taxonomy — fatal vs. transient
pipelineTypestate machine driving the deployment flow
resilienceExponential-backoff retry wrapper

§Quick Start

# 1. Log in to Azure
az login

# 2. Set your subscription
export AZURE_SUBSCRIPTION_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

# 3. Deploy
cargo run --bin rustlift

§Feature Flags

Rustlift currently exposes no Cargo feature flags. All crate functionality is available on the default build.

§Licence

This project uses a dual licence model:

  • Non-commercial use (learning, hobby projects, source-available contributions) is free.
  • Commercial use requires a separate paid licence.
  • An Enterprise Edition with additional features is available under a proprietary licence.

See the LICENSE file for full terms.

Modules§

errors
Deployment error taxonomy for the Rustlift pipeline.
pipeline
Typestate deployment pipeline for Azure Web Apps.
resilience
Exponential-backoff retry wrapper for transient cloud operations.