rustlift 2.0.2

A typestate-driven deployment agent for Azure Web Apps
Documentation
// Copyright (c) 2026 Hamze Ghalebi. All rights reserved.
// Licensed under the Rustlift Non-Commercial Licence v1.0.
// See the LICENSE file in the repository root for full terms.

#![warn(missing_docs)]
#![warn(rustdoc::broken_intra_doc_links)]
#![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::must_use_candidate)]

//! # Rustlift
//!
//! A typestate-driven deployment agent for Azure Web Apps.
//!
//! Rustlift automates the full lifecycle of deploying the Rust
//! [Axum](https://docs.rs/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`](https://github.com/cross-rs/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:
//!
//! ```text
//! 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
//!
//! | Module                      | Purpose                                        |
//! |-----------------------------|------------------------------------------------|
//! | [`errors`]                  | Typed error taxonomy — fatal vs. transient     |
//! | [`pipeline`]                | Typestate machine driving the deployment flow   |
//! | [`resilience`]              | Exponential-backoff retry wrapper               |
//!
//! ## Quick Start
//!
//! ```bash
//! # 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.

pub mod errors;
pub mod pipeline;
pub mod resilience;