Crates.io | nexus7 |
lib.rs | nexus7 |
version | 0.1.2 |
source | src |
created_at | 2024-08-14 16:09:08.92631 |
updated_at | 2024-08-14 16:09:08.92631 |
description | Rust SDK for HCL Transpilation |
homepage | |
repository | |
max_upload_size | |
id | 1337624 |
size | 79,133 |
nexus7 is a Rust SDK designed to transpile Rust code into HashiCorp Configuration Language (HCL). This project enables developers to write their infrastructure code in Rust while still leveraging Terraform or OpenTofu as backends for infrastructure management.
nexus7 was initially developed as a way to build infrastructure for pocketsizefund. As such, in its early stages, it focuses primarily on the infrastructure components used by pocketsizefund. However, our long-term goal is to expand its capabilities to cover a broader range of infrastructure needs.
Current limitations:
While these limitations reflect our current focus, we are committed to growing nexus7's capabilities over time to support a wider array of cloud providers, resource types, and configuration options.
Add nexus7 to your Cargo.toml:
[dependencies]
nexus7 = "0.1.0"
Run cargo build to fetch and compile the SDK:
cargo build
Example:
use nexus7::{Resource, Provider};
// Define a resource
let resource = Resource::new("aws_instance", "example")
.with_provider(Provider::AWS)
.with_attribute("ami", "ami-0c94855ba95c71c99")
.with_attribute("instance_type", "t2.micro");
// Transpile the resource to HCL
let hcl = resource.to_hcl();
// Apply the HCL using Terraform or OpenTofu
// ...
We welcome contributions to the nexus7 project! Please read our CONTRIBUTING.md file for guidelines on how to submit pull requests, report issues, and suggest improvements.
To run the test suite:
cargo test
For detailed documentation, please refer to the docs/
directory or visit our online documentation.
This project is licensed under the MIT License.
For questions, suggestions, or collaboration opportunities, please contact the project maintainers at contact@nexus7.example.com.
[List any individuals, organizations, or resources that have contributed to or inspired the project]