alejandra/
lib.rs

1//! Alejandra takes your Nix code and re-formats it in a consistent style.
2//!
3//! For more information please visit the
4//! [Alejandra repository on GitHub](https://github.com/kamadorueda/alejandra).
5#![deny(missing_docs)]
6#![deny(rustdoc::bare_urls)]
7#![deny(rustdoc::broken_intra_doc_links)]
8#![deny(rustdoc::invalid_codeblock_attributes)]
9#![deny(rustdoc::invalid_html_tags)]
10#![deny(rustdoc::invalid_rust_codeblocks)]
11#![deny(rustdoc::missing_crate_level_docs)]
12#![deny(rustdoc::private_intra_doc_links)]
13#![deny(rustdoc::private_doc_tests)]
14
15#[cfg(any(
16    // aarch64-unknown-linux-musl
17    all(
18        target_arch = "aarch64",
19        target_vendor = "unknown",
20        target_os = "linux",
21        target_env = "musl"
22    ),
23    // arm-unknown-linux-musleabihf
24    all(
25        target_arch = "arm",
26        target_vendor = "unknown",
27        target_os = "linux",
28        target_env = "musl",
29        target_abi = "eabihf"
30    ),
31    // i686-unknown-linux-musl
32    all(
33        target_arch = "x86",
34        target_vendor = "unknown",
35        target_os = "linux",
36        target_env = "musl"
37    ),
38    // x86_64-unknown-linux-gnu
39    // x86_64-unknown-linux-musl
40    all(
41        target_arch = "x86_64",
42        target_vendor = "unknown",
43        target_os = "linux",
44        any(target_env = "gnu", target_env = "musl")
45    ),
46))]
47#[global_allocator]
48static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
49
50pub(crate) mod builder;
51pub(crate) mod children;
52pub(crate) mod children2;
53/// Functions for formatting Nix code.
54pub mod format;
55pub(crate) mod parsers;
56pub(crate) mod position;
57pub(crate) mod rules;
58pub(crate) mod utils;
59/// Metadata.
60pub mod version;