Crates.io | wright |
lib.rs | wright |
version | 0.10.1 |
created_at | 2017-10-22 04:22:01.631489+00 |
updated_at | 2025-03-25 05:28:19.193925+00 |
description | The wright programming language compiler and tooling. |
homepage | |
repository | https://github.com/vcfxb/wright-lang |
max_upload_size | |
id | 36527 |
size | 249,574 |
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.
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) |
// 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);
}
There are several installation options.
cargo install wright
.cargo build --release
in the wright directory, and
then adding wright/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.