The Thrush Programming Language. A programming language dedicated to creating software that is highly adaptable to the programmer's experience.
There is currently a breach: no language focused on systems development exists that also offers easy-to-use features and a user-friendly language environment. For example:
Rust
Complexity is inherited by the borrow checker itself, and in addition to having an advanced LLVM lifetimes system, by default it is not beginner-friendly.C++
It's C++.
The programming language focuses on providing an advanced yet beginner-friendly experience while allowing for complete adaptability in certain circumstances, allowing for highly adaptable code based on the programmer's experience.
- Intrinsic manipulation of code generation.
- Strong sublanguage, with the ability to interoperate directly with LLVM and Assembler.
- Strongly statically typed.
- Complex unsafe environment.
- C interop.
- By default, a lot of good abstractions.
- Partial memory safety environment.
- Lightweight software (C-like).
- Minimal runtime requirements (only the C runtime).
mkdir build
thrushc -build-dir "build/" -llvm fibonacci.th -llvm-linker-flags "-ofibonacci;-melf_x86_64;--dynamic-linker=/lib64/ld-linux-x86-64.so.2;/usr/lib/crt1.o;/usr/lib/crti.o;/usr/lib/gcc/x86_64-pc-linux-gnu/15.
1.1/crtbegin.o;-L/usr/lib;-L/usr/lib/gcc/x86_64-pc-linux-gnu/15.1.1;-lc;/usr/lib/gcc/x86_64-pc-linux-gnu/15.1.1/crtend.o;/usr/lib/crtn.o" && ./fibonacci
thorium run
fn print(fmt: ptr) s32 @public @ignore @extern("printf");
fn fibonacci(n: u64) u64 @alwaysinline @strongstack @hot {
if n <= 1 {
return n;
}
return fibonacci(n - 2) + fibonacci(n - 1);
}
fn main() {
for local i: u64 = 0; i < 10; i++; {
local fmt: str = "fibonacci of '%ld': %ld\n";
// Explicit pointer arithmetic.
instr raw_fmt: ptr = load ptr, address fmt[0][0];
// Explicit pointer arithmetic.
print(raw_fmt, i, fibonacci(i));
}
}
- If you're interested in contributing to the project and you're a Spanish speaker, let us know by visiting our official social media channels below.
- If you already know Rust but not LLVM, we're willing to teach.