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::io::prelude::*;
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
||||||
mod engine;
|
extern crate rhai;
|
||||||
use engine::Engine;
|
use rhai::{Engine, FnRegister};
|
||||||
|
|
||||||
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?
|
|
||||||
|
|
||||||
fn showit<T: Display>(x: &mut T) -> () {
|
fn showit<T: Display>(x: &mut T) -> () {
|
||||||
println!("{}", x)
|
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