1//! `gimli` is a library for reading and writing the
2//! [DWARF debugging format](https://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// Style.
30#![allow(clippy::bool_to_int_with_if)]
31#![allow(clippy::collapsible_else_if)]
32#![allow(clippy::comparison_chain)]
33#![allow(clippy::manual_range_contains)]
34#![allow(clippy::needless_late_init)]
35#![allow(clippy::too_many_arguments)]
36// False positives with `fallible_iterator`.
37#![allow(clippy::should_implement_trait)]
38// False positives.
39#![allow(clippy::derive_partial_eq_without_eq)]
40#![no_std]
41
42#[allow(unused_imports)]
43#[cfg(any(feature = "read", feature = "write"))]
44#[macro_use]
45extern crate alloc;
46
47#[cfg(any(feature = "std", feature = "write"))]
48#[macro_use]
49extern crate std;
50
51#[cfg(feature = "endian-reader")]
52pub use stable_deref_trait::{CloneStableDeref, StableDeref};
53
54mod common;
55pub use crate::common::*;
56
57mod arch;
58pub use crate::arch::*;
59
60pub mod constants;
61// For backwards compat.
62pub use crate::constants::*;
63
64mod endianity;
65pub use crate::endianity::*;
66
67pub mod leb128;
68
69#[cfg(feature = "read-core")]
70pub mod read;
71// For backwards compat.
72#[cfg(feature = "read-core")]
73pub use crate::read::*;
74
75#[cfg(feature = "write")]
76pub mod write;
77
78#[cfg(test)]
79mod test_util;
80