The XE programming language
A small, indentation-based language that compiles to Rust and builds standalone native executables with rustc. Pre-alpha, built for learning and experimentation.
A small, indentation-based language that compiles to Rust and builds standalone native executables with rustc. Pre-alpha, built for learning and experimentation.
fun fib(n):
if n <= 1:
return n
return fib(n - 1) + fib(n - 2)
for n in [5, 10, 20]:
print("fib", n, "=", fib(n))$ xe run fib.xe
fib 5 = 5
fib 10 = 55
fib 20 = 6765
# or build a standalone binary
$ xe compile fib.xe -o fib
$ ./fibIndentation-based blocks, no semicolons or braces. Code that reads like pseudocode.
XE compiles to Rust and builds with rustc, so programs get its optimizer and safety checks.
xe compile produces a standalone executable. No VM or runtime to ship alongside it.