VastNova is a lightweight, statically typed programming language that compiles directly to native executables via LLVM. Clean syntax, type inference, and a minimal runtime — built for scripting, embedded systems, and learning compiler construction.
// Your first VastNova program var name = input("What's your name? ") if name == "sodous" { print("Hello, creator of VastNova!") } else { print("Hello, " + name + "!") }
A language designed for simplicity and performance — without the complexity overhead.
Compiles directly to optimized native executables via LLVM. No VM, no interpreter — just fast, standalone binaries.
Type safety by default with intelligent type inference. Write less boilerplate while catching errors at compile time.
Familiar C-style syntax that's easy to learn and pleasant to write. Minimal runtime means your code stays lean.
Tiny runtime footprint makes VastNova ideal for embedded systems, scripting, and resource-constrained environments.
The compiler source is clean and approachable — a perfect reference for understanding compiler construction.
Free to use, modify, and distribute. Contributions welcome from the community.
From a simple greeting to interactive programs — VastNova keeps it concise.
print("Hello, World!")
var a : i32 = 10 // explicit i32 var b : i64 = 2000000000 // explicit i64 var c : f64 = 3.14 // explicit f64 var name : str = "Alice" // explicit str var d = 42 // inferred i32 var e = 2.718 // inferred f64 var f = "Hello" // inferred str print("a =", a) print("d =", d) let pi : f64 = 3.14159 // constant print("pi =", pi)
var name = input("What is your name? ") var age = input("How old are you? ") print("Hello,", name, "you are", age, "years old.")
var i = 0 while i < 5 { print("i =", i) i = i + 1 } // break & continue var j = 0 while j < 10 { j = j + 1 if j == 3 {
continue
} if j == 7 {
break
} print(j) }
// Complete program using multiple features var name = input("What is your name? ") var age_str = input("How old are you? ") var age = int(age_str) if age >= 18 { print("You are an adult.") } else { print("You are a minor.") } var message = "Hello, " + name + "! Next year you'll be " + str(age + 1) + "." print(message)
Everything you need to write VastNova programs — from types to control flow.
Single-line (C++ & shell style) and block comments.
// single-line comment # also a comment !# block comment spans multiple lines #!
Static types with optional inference.
i32 // 32-bit signed int i64 // 64-bit signed int f64 // 64-bit float str // UTF-8 string
var for mutable, let for constants.
var x = 42 // inferred i32 var y : f64 = 3.14 // explicit let pi = 3.14159 // constant
Standard operators with type-aware results.
var sum = 10 + 5 // 15 (i32) var prod = 3.14 * 2 // 6.28 (f64) var div = 20 / 3 // 6 (truncating)
Built-in print and input functions.
print("Hello", name) var s = input("Prompt: ") var n = int(s) // string → i32 var f = float(s) // string → f64
If/else with comparison and logical operators.
if score >= 60 { print("Pass") } else if score >= 40 { print("Retry") } else { print("Fail") }
Condition-controlled loop with break & continue.
var i = 0 while i < 5 { print(i) i = i + 1 }
Concatenation with +, conversion via str().
var msg = "Pi is " + str(3.14159) print(msg) // Pi is 3.14159
Get up and running with VastNova in three simple steps.
Prerequisites — C++17 compiler, LLVM ≥ 14, clang, and llvm-config.
Clone the repository and build:
Write, compile, and run your first program:
Star the repo, clone the source, and start building with a language designed for clarity and speed.