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§
- Compile
Options - Compilation options
- Compile
Result - Result of compilation, including output and any info messages.
- Unsafe
Block Info - Information about an unsafe block (for auditing)
Enums§
- Output
Format - 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.