extern crate ketos;
#[macro_use] extern crate ketos_derive;
use ketos::{Interpreter, FromValue};
#[derive(Clone, Debug, ForeignValue, FromValueClone, StructValue)]
struct Thing {
name: String,
thing_count: u32,
#[ketos(rename = "type")]
typ: String,
}
fn main() {
let interp = Interpreter::new();
interp.scope().register_struct_value::<Thing>();
let value = interp.run_code(r#"
(new Thing
:name "thing-1"
:thing-count 9000
:type "thing")
"#, None).unwrap();
let thing = Thing::from_value(value).unwrap();
println!("{:?}", thing);
}