diff options
author | EuAndreh <eu@euandre.org> | 2021-05-30 19:40:02 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-05-30 19:40:02 -0300 |
commit | b8cf943fb17a750aaf9f567fb97e7392d9cfb455 (patch) | |
tree | 566499e8369922c8af63b574364c619755a02b7b /src/lib/lib.rs | |
parent | Remove empty Perl code (diff) | |
download | gistatic-b8cf943fb17a750aaf9f567fb97e7392d9cfb455.tar.gz gistatic-b8cf943fb17a750aaf9f567fb97e7392d9cfb455.tar.xz |
WIP init Rust
Diffstat (limited to 'src/lib/lib.rs')
-rw-r--r-- | src/lib/lib.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/lib.rs b/src/lib/lib.rs new file mode 100644 index 0000000..311a11f --- /dev/null +++ b/src/lib/lib.rs @@ -0,0 +1,19 @@ +const t: &'static str = include_str!("../templates/log.html"); + +pub fn a_fn() -> i32 { + // println!("log.html.tmpl: {}", t); + let template = mustache::compile_str(t).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() { +} |