aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-04-12 09:24:19 +0100
committerLibravatar cel 🌸 <cel@bunny.garden>2025-04-12 09:24:19 +0100
commit3d575ec2a4440e7e4597761eab907d63ef91175e (patch)
tree19edf8ad38300304f6bd2f0d81660173b5fee611 /src
parent92f4fd88295cb39bf865e10b0a28cc36acb5276a (diff)
downloadpeanuts-wasm.tar.gz
peanuts-wasm.tar.bz2
peanuts-wasm.zip
feat: move tokio features to dev-dependencies to allow wasm supportwasm
Diffstat (limited to 'src')
-rw-r--r--src/main.rs95
1 files changed, 0 insertions, 95 deletions
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index 580652e..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,95 +0,0 @@
-use peanuts::xml::composers::Composer;
-use peanuts::xml::parsers::Parser;
-use peanuts::xml::Document;
-
-#[tokio::main]
-async fn main() {
- let (rest, document) = Document::parse(
- "<?xml version='1.0' encoding='UTF-8'?>
-
- <xs:schema
- xmlns:xs='http://www.w3.org/2001/XMLSchema'
- targetNamespace='http://etherx.jabber.org/streams'
- xmlns='http://etherx.jabber.org/streams'
- elementFormDefault='unqualified'>
-
- <xs:import namespace='jabber:client'/>
- <xs:import namespace='jabber:server'/>
- <xs:import namespace='urn:ietf:params:xml:ns:xmpp-sasl'/>
- <xs:import namespace='urn:ietf:params:xml:ns:xmpp-streams'/>
- <xs:import namespace='urn:ietf:params:xml:ns:xmpp-tls'/>
-
- <xs:element name='stream'>
- <xs:complexType>
- <xs:sequence xmlns:client='jabber:client'
- xmlns:server='jabber:server'>
- <xs:element ref='features'
- minOccurs='0'
- maxOccurs='1'/>
- <xs:any namespace='urn:ietf:params:xml:ns:xmpp-tls'
- minOccurs='0'
- maxOccurs='1'/>
- <xs:any namespace='urn:ietf:params:xml:ns:xmpp-sasl'
- minOccurs='0'
- maxOccurs='1'/>
- <xs:any namespace='##other'
- minOccurs='0'
- maxOccurs='unbounded'
- processContents='lax'/>
- <xs:choice minOccurs='0' maxOccurs='1'>
- <xs:choice minOccurs='0' maxOccurs='unbounded'>
- <xs:element ref='client:message'/>
- <xs:element ref='client:presence'/>
- <xs:element ref='client:iq'/>
- </xs:choice>
- <xs:choice minOccurs='0' maxOccurs='unbounded'>
- <xs:element ref='server:message'/>
- <xs:element ref='server:presence'/>
- <xs:element ref='server:iq'/>
- </xs:choice>
- </xs:choice>
- <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
- </xs:sequence>
- <xs:attribute name='from' type='xs:string' use='optional'/>
- <xs:attribute name='id' type='xs:string' use='optional'/>
- <xs:attribute name='to' type='xs:string' use='optional'/>
- <xs:attribute name='version' type='xs:decimal' use='optional'/>
- <xs:attribute ref='xml:lang' use='optional'/>
- <xs:anyAttribute namespace='##other' processContents='lax'/>
- </xs:complexType>
- </xs:element>
-
- <xs:element name='features'>
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace='##other'
- minOccurs='0'
- maxOccurs='unbounded'
- processContents='lax'/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name='error'>
- <xs:complexType>
- <xs:sequence xmlns:err='urn:ietf:params:xml:ns:xmpp-streams'>
- <xs:group ref='err:streamErrorGroup'/>
- <xs:element ref='err:text'
- minOccurs='0'
- maxOccurs='1'/>
- <xs:any namespace='##other'
- minOccurs='0'
- maxOccurs='1'
- processContents='lax'/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- </xs:schema>asdf
-",
- )
- .unwrap();
- println!("{:#?}{}", document, rest);
- let mut stdout = tokio::io::stdout();
- document.write(&mut stdout).await.unwrap();
-}