Expand description
Tin is a simple embeddable programming language.
The aim is to have a very light-weight footprint and a simple API.
Examples
let source = r#"
Int = 0u32;
pickFirst = |a: Int, b: Int| Int {
capture = |x: Int| Int { a };
capture(b)
};
main = || Int { pickFirst(42u32, 62u32) };
"#;
let mut tin = tin_lang::Tin::new();
tin.load(source)?;
/*
let mut module = tin.compile()?;
let main = module.function::<tin_lang::module::Function0<u32>>("main").unwrap();
let result = main();
assert_eq!(42, result);
*/
Re-exports
Modules
Common error types and utilities.
Graph rendering tools for the internal representation of Tin code.
Definitions for compiled modules.
Structs
An instance of the Tin runtime.