Awesome
<!-- Put the icon at the top/in the title I guess... --><img src="./pages/static/assets/white_logo.png" height=50 /> The Wright Programming Language
A language that flies
Wright is an all-purpose programming language inspired by Rust, Ada, and Typescript. Pulling from all three of these excellent languages, Wright intends to offer a combination of speed, ergonomics, and precision.
Badges
Wright is automatically checked and tested using the latest available github runners for Ubuntu, MacOS, and Windows
Service | Badge |
---|---|
Cargo Check Status | |
Cargo Test Status | |
Cargo Clippy Status | |
Code Coverage (Coveralls) | |
Code Coverage (Codecov.io) | |
Docs.rs | |
Crates.io | |
GitHub release | |
GitHub (pre-)release | |
Development Status |
Downloads | |
---|---|
Total | |
Releases | |
Pre-Releases | |
Crates.io | |
Crates.io (Latest) |
Syntax Samples
// Hello World!
use wright::io::println;
func main() {
println("Hello World!");
}
// FizzBuzz 1 through 100
use wright::io::println;
type FizzBuzzInteger = integer constrain |i| { i <= 100 && i >= 0 };
func fizzbuzz(i: FizzBuzzInteger) {
if i % 15 == 0 { println("FizzBuzz"); }
else if i % 5 == 0 { println("Buzz"); }
else if i % 3 == 0 { println("Fizz"); }
else { println(i); }
}
func main() {
// Compiler error here if we use a range iterator that contains a value violating the constraints of
// `FizzBuzzInteger`.
(1..=100).for_each(fizzbuzz);
}
The core goals of the language:
- Developer experience -- Every error message, syntax choice, and standard library function should be friendly and well documented.
- Robustness -- Wright's type system should be expressive enough to appropriately capture the domain, representation, and functionality of every symbol the programmer interacts with.
- Speed -- Wright leverages the newest major version of LLVM (at the time of writing, LLVM 18), to compile code directly to assembly, avoiding the overhead of an interpreter, garbage collector, and other associated tools by default.
- Memory Safety -- Wright pulls significant inspiration from Rust's lifetime system, with some modifications.
Installation:
There are several installation options.
- Get the latest stable version from the releases page.
- If you have rust, via
cargo install wright
. - Building from source, by cloning this repository, and running
cargo build --release
in the wright directory, and then addingwright/target/release
to your system path. You will need LLVM 18 installed and appropriately configured to compile Wright. See the llvm-sys crate docs for tips on how to do this.