Move to lib style, move scripts into their own directory, start source examples

This commit is contained in:
jonathandturner 2016-03-03 10:55:28 -05:00
parent fbb5b72f24
commit fee3852979
13 changed files with 22 additions and 18 deletions

View File

@ -3,24 +3,8 @@ use std::fs::File;
use std::io::prelude::*;
use std::fmt::Display;
mod engine;
use engine::Engine;
mod fn_register;
use fn_register::FnRegister;
mod parser;
// Todo (in no particular order):
// * Doc some examples
// * Maintaining state
// * Overloading
// * How it works
// * Vectors
// * Return
// * Tighten parser?
// * Errors with positions?
// * Remove empty box values?
extern crate rhai;
use rhai::{Engine, FnRegister};
fn showit<T: Display>(x: &mut T) -> () {
println!("{}", x)
@ -51,3 +35,4 @@ fn main() {
}
}
}

19
src/lib.rs Normal file
View File

@ -0,0 +1,19 @@
//! Rhai - embedded scripting for Rust
// Todo (in no particular order):
// * Doc some examples
// * Maintaining state
// * Overloading
// * How it works
// * Vectors
// * Tighten parser?
// * Errors with positions?
mod engine;
mod fn_register;
mod parser;
pub use engine::Engine;
pub use fn_register::FnRegister;