Example programs written in the Ferrum programming language.
Ferrum has C syntax with compile-time memory safety — no garbage collector, no runtime overhead.
| File | What it shows |
|---|---|
hello.fe |
Hello World — the simplest Ferrum program |
counter.fe |
While loop and integer arithmetic |
factorial.fe |
Recursive function, for loop |
ownership.fe |
new, move(), automatic free() |
borrows.fe |
Immutable & and mutable &mut borrows |
unsafe_demo.fe |
Raw pointers inside unsafe {} blocks |
git clone https://github.com/Ferrum-Language/Ferrum.git
cd Ferrum
bash build.sh./build/ferrumc hello.fe -o hello
./hello./build/ferrumc ownership.fe --emit-irg++with C++20- LLVM 18 (
llvm-config,llc) gcc(for linking)
# Ubuntu / Debian
sudo apt install llvm-18 llvm-18-dev gcc g++ build-essentialFerrum-language Compiler v0.3 — Ferrum-Language