Learn Flecha
This guide assumes you have built the compiler. Flecha files use the .fl extension, and an executable entry module defines either i32 main() or void main().
Your first program
Section titled “Your first program”void main() { stdoutln("Hello from Flecha");}build/flecha check hello.flbuild/flecha build hello.fl -o build/hello./build/hellocheck runs the frontend without creating an artifact. build emits and links a native executable.
Functions and inferred locals
Section titled “Functions and inferred locals”Return types appear before function names. := infers a local variable’s type.
i32 square(i32 value) { return value * value;}
void main() { answer := square(7); stdoutln(answer);}Memory and safety boundaries
Section titled “Memory and safety boundaries”Checked references and slices can be used in safe code. Raw pointers and raw allocation require an explicit unsafe context. Ownership contracts and definite-assignment checks help the compiler reject invalid resource flows.
Projects with Longbow
Section titled “Projects with Longbow”build/longbow new hellocd hello../build/longbow check../build/longbow runContinue with modules and package layout, then explore the examples and language specification.