Add the binary back in because we need it for generating jaeger traces.

This commit is contained in:
Tom Alexander 2023-04-19 18:12:53 -04:00
parent 99677ee98e
commit 1deb53f1a3
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 27 additions and 0 deletions

View File

@ -3,11 +3,16 @@ name = "toy"
version = "0.1.0"
edition = "2021"
license = "0BSD"
default-run = "toy"
[lib]
name = "organic"
path = "src/lib.rs"
[[bin]]
name = "toy"
path = "src/main.rs"
[dependencies]
nom = "7.1.1"
opentelemetry = "0.17.0"

17
src/main.rs Normal file
View 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
View File

@ -0,0 +1,5 @@
foo
:drawername:
:end: