Native compilation
Compile the supported subset to Windows x64 executables with external Clang.
zebvix build --target native --release emits a PE through LLVM-MinGW Clang. Use zebvix run --engine native to build and run. Debug and release use O0 and O2 respectively.
Native ABI v3 supports verified structured values and bounded numeric parallel tasks. Unsupported operations produce diagnostics. Generated executables can run without Cargo, Rust or Clang.
native-structured
examples/native-structured/src/main.zbl · v0.5.0-preview.5 · interpreter, bytecode, native
shape Row:
label: text
values: List[i64]
choice Answer:
Ready(row: Row)
Missing
task square(x: i64) gives i64:
give x * x
rows: Map[text, List[Row]] = {}
values = parallel_map("square", [3, 2, 4], 2)
rows = put(rows, "numbers", [Row("native", move_value(values))])
result = Answer.Ready(rows["numbers"][0])
choose result:
case Missing:
show "missing"
case Ready(row):
show row.label
repeat value in row.values:
show value
native
9
4
16