Move to lib style, move scripts into their own directory, start source examples
This commit is contained in:
parent
fbb5b72f24
commit
fee3852979
@ -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
19
src/lib.rs
Normal 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;
|
Loading…
Reference in New Issue
Block a user