roto 0.10.0

a statically-typed, compiled, embedded scripting language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use roto::Runtime;

fn main() -> Result<(), roto::RotoReport> {
    #[cfg(feature = "logger")]
    env_logger::init();

    let runtime = Runtime::new();
    let mut pkg = runtime
        .compile("examples/modules")
        .inspect_err(|e| eprintln!("{e}"))?;

    let f = pkg.get_function::<fn(i32) -> i32>("main").unwrap();

    let x = f.call(4i32);
    println!("main(4) = {x}");
    Ok(())
}