File tree Expand file tree Collapse file tree 1 file changed +29
-6
lines changed Expand file tree Collapse file tree 1 file changed +29
-6
lines changed Original file line number Diff line number Diff line change 1
- # Weedle - A WebIDL Parser
1
+ <div align =" center " >
2
+
3
+ <h1 >Weedle</h1 >
4
+
5
+ <strong >A Web IDL parser</strong >
6
+
7
+ <p >
8
+ <a href="https://travis-ci.org/rustwasm/weedle"><img src="https://img.shields.io/travis/rustwasm/weedle.svg?style=flat-square" alt="Build Status" /></a>
9
+ <a href="https://crates.io/crates/weedle"><img src="https://img.shields.io/crates/v/weedle.svg?style=flat-square" alt="Crates.io version" /></a>
10
+ <a href="https://crates.io/crates/weedle"><img src="https://img.shields.io/crates/d/weedle.svg?style=flat-square" alt="Download" /></a>
11
+ <a href="https://docs.rs/weedle"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
12
+ </p >
13
+
14
+ <h3 >
15
+ <a href="https://docs.rs/weedle">API Docs</a>
16
+ <span> | </span>
17
+ <a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
18
+ </h3 >
19
+
20
+ <sub >Built with 🦀🕸 by <a href =" https://rustwasm.github.io/ " >The Rust and WebAssembly Working Group</a ></sub >
21
+ </div >
22
+
23
+ ## About
2
24
3
25
Parses valid WebIDL definitions & produces a data structure starting from
4
26
[ ` Definitions ` ] ( https://docs.rs/weedle/latest/weedle/type.Definitions.html ) .
5
27
6
- ### Basic Usage
28
+ ## Usage
29
+
30
+ ### ` Cargo.toml `
7
31
8
- In Cargo.toml
9
32
``` toml
10
33
[dependencies ]
11
34
weedle = " 0.9.0"
12
35
```
13
36
14
- Then, in ` src/main.rs `
15
- ``` rust
16
- extern crate weedle;
37
+ ### ` src/main.rs `
17
38
39
+ ``` rust
18
40
fn main () {
19
41
let parsed = weedle :: parse ("
20
42
interface Window {
21
43
readonly attribute Storage sessionStorage;
22
44
};
23
45
" ). unwrap ();
46
+
24
47
println! (" {:?}" , parsed );
25
48
}
26
49
```
You can’t perform that action at this time.
0 commit comments