Crate horkos

Crate horkos 

Source
Expand description

§Horkos

Infrastructure language where insecure code won’t compile.

Horkos is a statically typed language that compiles to Terraform HCL, enforcing security invariants at compile time.

§Quick Start

use horkos::{compile_source, CompileOptions};

let source = r#"
    val bucket = S3.createBucket("my-data")
"#;

let hcl = compile_source(source, &CompileOptions::default())?;
println!("{}", hcl);

Re-exports§

pub use project::compile_project;
pub use project::Project;
pub use project::ProjectError;
pub use types::PreferredOverride;
pub use types::extract_exports;
pub use types::GlobalSymbolTable;
pub use types::ModuleExports;

Modules§

ast
Abstract Syntax Tree definitions for Horkos.
codegen
Code generation for Horkos.
errors
Error handling and diagnostics for Horkos.
lexer
Lexer for Horkos source code.
parser
Recursive descent parser for Horkos.
project
Project management for multi-file Horkos projects.
resources
Resource definitions for Horkos.
stdlib
Standard library for Horkos.
types
Type checking and taint analysis for Horkos.

Structs§

CompileOptions
Compilation options
CompileResult
Result of compilation, including output and any info messages.
UnsafeBlockInfo
Information about an unsafe block (for auditing)

Enums§

OutputFormat
Output format for compilation

Functions§

check_file
Check a file for errors without generating output.
check_source
Check source code for errors without generating output.
compile_and_extract
Compile and return both HCL output, typed AST, and preferred overrides.
compile_file
Compile a Horkos source file to Terraform HCL.
compile_source
Compile Horkos source code to Terraform HCL.
compile_source_with_globals
Compile Horkos source code with access to cross-file symbols.
find_unsafe_blocks
Find all unsafe blocks in a directory.