Change repo to generate both a library and a binary.
This repo will primary be a library, but for compliance testing it may make sense to have a binary operating in the same fashion as the node dustjs shim so I've set up this repo to generate both a library and a binary.
This commit is contained in:
parent
0d659afa2f
commit
fb17911c44
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,7 +1,6 @@
|
|||||||
/target
|
/target
|
||||||
|
|
||||||
# May wish to include this later since this is primarily a library,
|
# This repo is primarily a library, so ignore Cargo.lock
|
||||||
# but ignoring it for early development
|
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
|
||||||
# Backup files generated by rustfmt
|
# Backup files generated by rustfmt
|
||||||
|
@ -4,7 +4,13 @@ version = "0.1.0"
|
|||||||
authors = ["Tom Alexander <tom@fizz.buzz>"]
|
authors = ["Tom Alexander <tom@fizz.buzz>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
[lib]
|
||||||
|
name = "duster"
|
||||||
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "duster-cli"
|
||||||
|
path = "src/bin.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nom = { git = "https://github.com/tomalexander/nom.git", branch = "take_until_parser_matches" }
|
nom = { git = "https://github.com/tomalexander/nom.git", branch = "take_until_parser_matches" }
|
||||||
|
9
src/bin.rs
Normal file
9
src/bin.rs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
extern crate nom;
|
||||||
|
use parser::template;
|
||||||
|
|
||||||
|
mod parser;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let parsed_template = template("{#foo.bar}hello {name}{/foo.bar}!");
|
||||||
|
println!("{:?}", parsed_template);
|
||||||
|
}
|
@ -1,5 +1,3 @@
|
|||||||
extern crate nom;
|
extern crate nom;
|
||||||
|
|
||||||
mod parser;
|
mod parser;
|
||||||
|
|
||||||
fn main() {}
|
|
Loading…
x
Reference in New Issue
Block a user