1#![deny(missing_docs)]
17#![deny(missing_debug_implementations)]
18#![forbid(unused_must_use)]
19#![deny(unsafe_code)]
20#![cfg_attr(feature = "dox", feature(doc_cfg))]
21#![deny(clippy::dbg_macro)]
22#![deny(clippy::todo)]
23
24pub use composefs;
28pub use composefs_boot;
29pub use composefs_oci;
30pub use containers_image_proxy;
31pub use containers_image_proxy::oci_spec;
32pub use ostree;
33pub use ostree::gio;
34pub use ostree::gio::glib;
35
36type Result<T> = anyhow::Result<T>;
39
40pub mod globals;
42
43mod isolation;
44
45pub mod bootabletree;
46pub mod cli;
47pub mod container;
48pub mod container_utils;
49pub mod diff;
50pub(crate) mod generic_decompress;
51pub mod ima;
52pub mod keyfileext;
53pub(crate) mod logging;
54pub mod ostree_prepareroot;
55pub mod refescape;
56#[doc(hidden)]
57pub mod repair;
58pub mod repo_options;
59pub mod sysroot;
60pub mod tar;
61pub mod tokio_util;
62
63pub mod selinux;
64
65pub mod chunking;
66pub mod commit;
67pub mod objectsource;
68pub(crate) mod objgv;
69#[cfg(feature = "internal-testing-api")]
70pub mod ostree_manual;
71#[cfg(not(feature = "internal-testing-api"))]
72pub(crate) mod ostree_manual;
73
74pub(crate) mod statistics;
75
76mod utils;
77
78#[cfg(feature = "docgen")]
79mod docgen;
80pub mod fsverity;
81
82pub mod prelude {
84 #[doc(hidden)]
85 pub use ostree::prelude::*;
86}
87
88#[cfg(feature = "internal-testing-api")]
89pub mod fixture;
90#[cfg(feature = "internal-testing-api")]
91pub mod integrationtest;
92
93pub fn systemd_has_soft_reboot() -> bool {
96 const UNIT: &str = "/usr/lib/systemd/system/soft-reboot.target";
97 use std::sync::OnceLock;
98 static EXISTS: OnceLock<bool> = OnceLock::new();
99 *EXISTS.get_or_init(|| std::path::Path::new(UNIT).exists())
100}