1#![doc = include_str!("../BUILD-OPTIONS.md")]
8#![no_std]
9#![cfg_attr(
10 all(not(feature = "std"), feature = "alloc_handler"),
11 feature(alloc_error_handler)
12)]
13#![allow(unknown_lints)]
14#![allow(renamed_and_removed_lints)]
15#![allow(unexpected_cfgs)]
16
17pub use bindings::*;
18pub use error::*;
19
20#[cfg(all(
23 not(esp_idf_version_at_least_6_0_0),
24 any(esp32, esp32s2, esp32s3, esp32c5, esp32c6, esp32h2, esp32p4)
25))]
26pub use pcnt::*;
27
28#[doc(hidden)]
29pub use build_time;
30#[doc(hidden)]
31pub use const_format;
32#[doc(hidden)]
33pub use patches::PatchesRef;
34
35#[cfg(feature = "std")]
36#[allow(unused_imports)]
37#[macro_use]
38extern crate std;
39
40#[cfg(feature = "alloc")]
41#[allow(unused_imports)]
42#[macro_use]
43extern crate alloc;
44
45mod alloc;
46#[cfg(esp_idf_version_at_least_5_1_0)]
47mod app_desc;
48mod error;
49mod panic;
50mod patches;
51#[cfg(all(
52 not(esp_idf_version_at_least_6_0_0),
53 any(esp32, esp32s2, esp32s3, esp32c5, esp32c6, esp32h2, esp32p4)
54))]
55mod pcnt;
56
57mod checks;
58mod start;
59mod stdio;
60
61pub use stdio::restore_posix_stdio_fds;
62
63pub fn link_patches() -> PatchesRef {
68 patches::link_patches()
69}
70
71#[allow(clippy::all)]
72#[allow(unnecessary_transmutes)]
73#[allow(non_upper_case_globals)]
74#[allow(non_camel_case_types)]
75#[allow(non_snake_case)]
76#[allow(rustdoc::all)]
77#[allow(improper_ctypes)]
78#[allow(suspicious_runtime_symbol_definitions)]
82#[allow(dead_code)]
83mod bindings {
84 #[cfg(all(
85 not(esp_idf_version_at_least_6_0_0),
86 any(esp32, esp32s2, esp32s3, esp32c5, esp32c6, esp32h2, esp32p4)
87 ))]
88 use crate::pcnt::*;
89
90 include!(env!("EMBUILD_GENERATED_BINDINGS_FILE"));
91}