| 1 |
//! A common backend for bindgen crates. |
| 2 |
//! |
| 3 |
//! This (internal) crate provides functionality common to multiple bindgen |
| 4 |
//! dependency crates. There are 4 main things exported from this crate: |
| 5 |
//! |
| 6 |
//! 1. [**`TryToTokens`**](./trait.TryToTokens.html) |
| 7 |
//! |
| 8 |
//! Provides the ability to attempt conversion from an AST struct |
| 9 |
//! into a TokenStream |
| 10 |
//! |
| 11 |
//! 2. [**`Diagnostic`**](./struct.Diagnostic.html) |
| 12 |
//! |
| 13 |
//! A struct used to provide diagnostic responses for failures of said |
| 14 |
//! tokenization |
| 15 |
//! |
| 16 |
//! 3. [**`ast`**](./ast/index.html) |
| 17 |
//! |
| 18 |
//! Abstract Syntax Tree types used to represent a Rust program, with |
| 19 |
//! the necessary metadata to generate bindings for it |
| 20 |
//! |
| 21 |
//! 4. [**`util`**](./util/index.html) |
| 22 |
//! |
| 23 |
//! Common utilities for manipulating parsed types from syn |
| 24 |
//! |
| 25 |
|
| 26 |
#![recursion_limit = "256"] |
| 27 |
#![cfg_attr(feature = "extra-traits", deny(missing_debug_implementations))] |
| 28 |
#![deny(missing_docs)] |
| 29 |
#![doc(html_root_url = "https://docs.rs/wasm-bindgen-backend/0.2")] |
| 30 |
|
| 31 |
pub use crate::codegen::TryToTokens; |
| 32 |
pub use crate::error::Diagnostic; |
| 33 |
|
| 34 |
#[macro_use] |
| 35 |
mod error; |
| 36 |
|
| 37 |
pub mod ast; |
| 38 |
mod codegen; |
| 39 |
mod encode; |
| 40 |
pub mod util; |