diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..2bd4a2e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,19 @@ +const LOG: &'static str = include_str!("templates/log.html"); + +pub fn a_fn() -> i32 { + // println!("log.html.tmpl: {}", t); + let template = mustache::compile_str(LOG).unwrap(); + let _data = mustache::MapBuilder::new() + .insert_str("name", "Venus") + .build(); + + let mut d2 = std::collections::HashMap::new(); + d2.insert("a", "b"); + template.render(&mut std::io::stdout(), &d2). unwrap(); + + 0 +} + +#[test] +fn a_test() { +} |