1 //! `gimli` is a library for reading and writing the 2 //! [DWARF debugging format](http://dwarfstd.org/). 3 //! 4 //! See the [read](./read/index.html) and [write](./write/index.html) modules 5 //! for examples and API documentation. 6 //! 7 //! ## Cargo Features 8 //! 9 //! Cargo features that can be enabled with `gimli`: 10 //! 11 //! * `std`: Enabled by default. Use the `std` library. Disabling this feature 12 //! allows using `gimli` in embedded environments that do not have access to 13 //! `std`. Note that even when `std` is disabled, `gimli` still requires an 14 //! implementation of the `alloc` crate. 15 //! 16 //! * `read`: Enabled by default. Enables the `read` module. Use of `std` is 17 //! optional. 18 //! 19 //! * `write`: Enabled by default. Enables the `write` module. Always uses 20 //! the `std` library. 21 #![deny(missing_docs)] 22 #![deny(missing_debug_implementations)] 23 // Selectively enable rust 2018 warnings 24 #![warn(bare_trait_objects)] 25 #![warn(unused_extern_crates)] 26 #![warn(ellipsis_inclusive_range_patterns)] 27 //#![warn(elided_lifetimes_in_paths)] 28 #![warn(explicit_outlives_requirements)] 29 // Allow clippy warnings when we aren't building with clippy. 30 #![allow(unknown_lints)] 31 // False positives with `fallible_iterator`. 32 #![allow(clippy::should_implement_trait)] 33 // Many false positives involving `continue`. 34 #![allow(clippy::never_loop)] 35 // False positives when block expressions are used inside an assertion. 36 #![allow(clippy::panic_params)] 37 #![no_std] 38 39 #[allow(unused_imports)] 40 #[macro_use] 41 extern crate alloc; 42 43 #[cfg(any(feature = "std", feature = "write"))] 44 #[macro_use] 45 extern crate std; 46 47 #[cfg(feature = "read")] 48 pub use stable_deref_trait::{CloneStableDeref, StableDeref}; 49 50 mod common; 51 pub use crate::common::*; 52 53 mod arch; 54 pub use crate::arch::*; 55 56 pub mod constants; 57 // For backwards compat. 58 pub use crate::constants::*; 59 60 mod endianity; 61 pub use crate::endianity::{BigEndian, Endianity, LittleEndian, NativeEndian, RunTimeEndian}; 62 63 pub mod leb128; 64 65 #[cfg(feature = "read")] 66 pub mod read; 67 // For backwards compat. 68 #[cfg(feature = "read")] 69 pub use crate::read::*; 70 71 #[cfg(feature = "write")] 72 pub mod write; 73 74 #[cfg(test)] 75 mod test_util; 76