asimov_module/
lib.rs

1// This is free and unencumbered software released into the public domain.
2
3#![no_std]
4#![forbid(unsafe_code)]
5
6extern crate alloc;
7
8pub use dogma::prelude;
9
10#[cfg(feature = "cli")]
11pub use clientele::{SysexitsError, SysexitsResult, args_os, dotenv, exit};
12
13#[cfg(feature = "std")]
14pub use getenv;
15
16pub use secrecy;
17
18#[cfg(feature = "tracing")]
19pub use tracing;
20
21#[cfg(feature = "tracing")]
22pub use tracing_subscriber;
23
24#[cfg(all(feature = "std", feature = "cli", feature = "tracing"))]
25pub fn init_tracing_subscriber(
26    options: &clientele::StandardOptions,
27) -> Result<(), alloc::boxed::Box<(dyn core::error::Error + Send + Sync + 'static)>> {
28    extern crate std;
29    tracing_subscriber::fmt()
30        .with_writer(std::io::stderr)
31        .with_max_level(options)
32        .with_level(options.debug || options.verbose > 0)
33        .with_target(options.debug)
34        .with_file(false)
35        .without_time()
36        .try_init()
37}
38
39pub mod models;
40
41pub mod resolve;