From 3d575ec2a4440e7e4597761eab907d63ef91175e Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sat, 12 Apr 2025 09:24:19 +0100 Subject: feat: move tokio features to dev-dependencies to allow wasm support --- examples/example.rs | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 examples/example.rs (limited to 'examples/example.rs') diff --git a/examples/example.rs b/examples/example.rs new file mode 100644 index 0000000..580652e --- /dev/null +++ b/examples/example.rs @@ -0,0 +1,95 @@ +use peanuts::xml::composers::Composer; +use peanuts::xml::parsers::Parser; +use peanuts::xml::Document; + +#[tokio::main] +async fn main() { + let (rest, document) = Document::parse( + " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + asdf +", + ) + .unwrap(); + println!("{:#?}{}", document, rest); + let mut stdout = tokio::io::stdout(); + document.write(&mut stdout).await.unwrap(); +} -- cgit