devela/build/mod.rs
1// devela::build
2//
3//!
4//
5// NOTE: imported from `../src/_info/mod.rs`.
6// NOTE: Have to use relative imports (super::*) instead of crate::*,
7// so that it can also work when compiling the private documentation.
8//
9// SEE:
10// https://doc.rust-lang.org/cargo/reference/build-scripts.html
11
12#![cfg_attr(nightly_doc, feature(doc_cfg, doc_notable_trait))]
13#![cfg_attr(test, allow(dead_code))]
14
15mod environment;
16mod features;
17mod generate; // tuple, unroll
18mod utils; // out_dir, manifest_dir, manifest_path, println* , TAB*
19
20fn main() {
21 if let Err(err) = try_main() {
22 panic!("{}", err);
23 }
24}
25
26fn try_main() -> Result<(), Box<dyn core::error::Error>> {
27 #[cfg(feature = "__dbg")]
28 utils::println_start_end(true);
29
30 environment::main()?;
31 features::main()?;
32 generate::main()?;
33
34 #[cfg(feature = "__dbg")]
35 utils::println_start_end(false);
36 Ok(())
37}