Skip to content
/ fl8 Public

Lightweight cloud-agnostic infrastructure in Rust πŸ¦€

License

Notifications You must be signed in to change notification settings

kodlot/fl8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ fl8 β€” Lightweight Cloud-Agnostic IaC Library

License

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.


🧩 Features

  • 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

πŸ“¦ Installation

Add fl8 as a dependency in your Cargo.toml:

[dependencies]
fl8 = "0.1.0"

πŸ“ Project Structure

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

πŸ’» CLI Commands

fl8 provides a lightweight command-line interface for managing your infrastructure. The two primary commands are plan and launch.


πŸ—ΊοΈ fl8 plan

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

πŸš€ fl8 launch

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 changes

Notes:

  • It’s recommended to run fl8 plan before fl8 launch.
  • The command respects resource dependencies and deployment order.

🚩 Optional Flags

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

🟒 Getting Started

Requirements

  • VS Code with Remote Containers extension
  • Podman or Docker
  • Rust toolchain (automatically installed in Dev Container)
  • AWS CLI

βš™οΈ Development Setup

  1. Clone the repository:
git clone https://github.com/kodlot/fl8.git
cd fl8
  1. Open VS Code and Reopen in Dev Container.

  2. Dev Container will automatically install:

  • Rust (stable, 2024 edition)
  • rustfmt and clippy
  • Rust Analyzer extension
  • AWS CLI
  1. Start coding! Rust files will auto-format on save, and Clippy can be run via VS Code Tasks.

βœ… Running Tests

cargo test

This 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.

πŸ’‘ Running Examples

cargo run --example example_stack

✨ Formatting and Linting

  • Auto-format on save is enabled (rustfmt).
  • To manually format:
cargo fmt
  • To run lint checks:
cargo clippy --all-targets --all-features

πŸ“ Contributing

We 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.

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Commit your changes: git commit -m "Description"
  4. Push to branch: git push origin feature-name
  5. Open a Pull Request

βš–οΈ License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.


πŸ›€οΈ Roadmap

  • Implement first stable IaC deployment engine
  • Add project/stack/construct resource organization
  • Improve CLI and automation tooling

Releases

No releases published

Packages

No packages published