An experimental strongly typed systems language with a JIT compiler written in Rust using Cranelift with a static type checker.
- ADTs and Arrays
- Pattern matching (ranges, destructuring, wildcards)
- Bit-packing for arbitrary-width (<64) integers (
u13,i42) packed to maximise cache efficiency. - Pipeline operator (
|>) as a form of UFCS. - Libc FFI for IO
Functions
fn add(a: i64, b: i64) -> i64 {
a + b
}
add(2, 3)ADTs
struct Point {
x: i64,
y: i64,
}
enum Event {
Click(Point),
Quit,
}Pattern matching
let val = 15
let r = match val {
0..10 => 0,
10..=20 => 1,
_ => 2,
}Arrays
let arr: [i64; 4] = [10, 20, 30, 40]
let x = arr[2]Arbitrary width integers
struct BitPack {
is_active: u1,
day_of_week: u3,
count: i17,
}Pipeline operator
fn add(a: i64, b: i64) -> i64 {
a + b
}
let x = 10 |> add(5)cargo build --releasecargo run --release -- <file.tjit>tjit <filename.tjit>- Heap FFI (
alloc/free)- Affine type system (move semantics)
- RAII (and drop traits?)
- Borrow checker with mutability ^ aliasing (and a MIR for that) and NLLs.