fl8 is a Rust library for infrastructure as code (IaC), designed to be cloud-agnostic, enabling deployment across AWS, other cloud providers, and SaaS platforms. Its goal is to provide a fast, type-safe, and modular framework for defining infrastructure resources and deployments.
- Define cloud infrastructure in Rust with strong typing
- Focused on performance, leveraging Rustβs speed and memory safety
- Support for multiple clouds and SaaS platforms
- Modular resource definitions with optional stacks and constructs
- Easy-to-extend library with examples and tests included
Add fl8 as a dependency in your Cargo.toml:
[dependencies]
fl8 = "0.1.0"fl8/
ββ .devcontainer/ # VS Code DevContainer configuration
ββ .vscode/ # VS Code settings & tasks
ββ examples/ # Examples
ββ src/ # Rust source code
ββ tests/ # Tests
ββ Cargo.toml # Rust project manifest
ββ rustfmt.toml # Rust formatter configuration
ββ README.md
fl8 provides a lightweight command-line interface for managing your infrastructure. The two primary commands are plan and launch.
The plan command previews the changes that will be made by your infrastructure definitions without applying them. It acts as a dry run.
fl8 plan- Analyzes your resource definitions.
- Shows a summary of resources that will be created, updated, or deleted.
- Useful to review the impact of changes before deployment.
Example output:
Plan: 3 to add, 1 to modify, 0 to destroy
- AWS::S3::Bucket "my-bucket" -> create
- AWS::Lambda::Function "handler" -> create
- Postgres::Database "app-db" -> modify
The launch command executes the deployment based on your current stack or construct definitions.
fl8 launch- Applies the planned changes to your cloud provider.
- Creates, updates, or deletes resources as necessary.
- Automatically tracks the deployment state for future runs.
Example output:
fl8 plan # Preview the changes first
fl8 launch # Apply the changesNotes:
- Itβs recommended to run fl8 plan before fl8 launch.
- The command respects resource dependencies and deployment order.
You can extend the CLI with optional flags for more control:
--stack <name>: Deploy a specific stack.--construct <name>: Deploy a specific construct.--dry-run: Show the plan without making changes (similar to plan).
Example:
fl8 launch --stack my-stack --dry-run- VS Code with Remote Containers extension
- Podman or Docker
- Rust toolchain (automatically installed in Dev Container)
- AWS CLI
- Clone the repository:
git clone https://github.com/kodlot/fl8.git
cd fl8-
Open VS Code and Reopen in Dev Container.
-
Dev Container will automatically install:
- Rust (stable, 2024 edition)
rustfmtandclippy- Rust Analyzer extension
- AWS CLI
- Start coding! Rust files will auto-format on save, and Clippy can be run via VS Code Tasks.
cargo testThis command will:
- Compile your crate and its dependencies.
- Run all unit tests defined in
#[cfg(test)]modules. - Show detailed output for passed, failed, and ignored tests.
cargo run --example example_stack- Auto-format on save is enabled (
rustfmt). - To manually format:
cargo fmt- To run lint checks:
cargo clippy --all-targets --all-featuresWe welcome contributions! Please open issues or submit pull requests for bug fixes, new features, or improvements. By contributing, you agree that your contributions will be licensed under the Apache 2.0 license.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -m "Description" - Push to branch:
git push origin feature-name - Open a Pull Request
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
- Implement first stable IaC deployment engine
- Add project/stack/construct resource organization
- Improve CLI and automation tooling