Skip to content
/ zap Public

a scripting language (primarily) for games written in Rust

Notifications You must be signed in to change notification settings

xor-bits/zap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zap

a programming language for (game) scripting

strongly typed, type inference, scripting language, interop, LLVM JIT

Hello world + Fibonacci sequence

prints("Fibonacci sequence:");
a := 0;
b := 1;
for {
    printi(a);
    a, b = b, a + b;
}

Usage from Rust

let mut compiler = Compiler::new();
compiler.add("sum", |a: i32, b: i32| a + b).unwrap();
compiler.add("print", |a: i32| println!("{a}")).unwrap();
compiler.run(r#"
    print(sum(40, 2));
"#).unwrap();

About

a scripting language (primarily) for games written in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published