Add the binary back in because we need it for generating jaeger traces.
This commit is contained in:
parent
99677ee98e
commit
1deb53f1a3
@ -3,11 +3,16 @@ name = "toy"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "0BSD"
|
license = "0BSD"
|
||||||
|
default-run = "toy"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "organic"
|
name = "organic"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "toy"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nom = "7.1.1"
|
nom = "7.1.1"
|
||||||
opentelemetry = "0.17.0"
|
opentelemetry = "0.17.0"
|
||||||
|
17
src/main.rs
Normal file
17
src/main.rs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#![feature(round_char_boundary)]
|
||||||
|
use crate::init_tracing::init_telemetry;
|
||||||
|
use crate::init_tracing::shutdown_telemetry;
|
||||||
|
use crate::parser::document;
|
||||||
|
mod init_tracing;
|
||||||
|
mod parser;
|
||||||
|
|
||||||
|
const TEST_DOC: &'static str = include_str!("../toy_language.txt");
|
||||||
|
|
||||||
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
init_telemetry()?;
|
||||||
|
let parsed = document(TEST_DOC);
|
||||||
|
println!("{}\n\n\n", TEST_DOC);
|
||||||
|
println!("{:#?}", parsed);
|
||||||
|
shutdown_telemetry()?;
|
||||||
|
Ok(())
|
||||||
|
}
|
5
toy_language.txt
Normal file
5
toy_language.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
foo
|
||||||
|
:drawername:
|
||||||
|
|
||||||
|
|
||||||
|
:end:
|
Loading…
x
Reference in New Issue
Block a user