package mantra.compiler

NativeCompiler

CLASS public class

Compiler driver executing host Clang/GCC to produce native executables with -O2 optimization.

🏗️ Constructor Summary

Constructor Signature
def __init__(self)

⚙️ Method Summary

Modifier & Return Type Method Signature Description
Path compile_c_to_binary(c_code: String, out_path: Path, opt: Bool) Invokes Clang to build native binary.

🔍 Detailed Method Specifications

pub def compile_c_to_binary(c_code: String, out_path: Path, opt: Bool) -> Path
Invokes Clang to build native binary.

💡 Example Usage

nativecompiler_example.mantra
NativeCompiler.compile_c_to_binary(c_code, Path("app"), True)