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