devela/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
// devela::lib
//
//! A cohesive development layer.
//!
#![doc = include_str!("./Lib.md")]
//

/* global configuration */
//
// lints
//
// (Most are defined in Cargo.toml)
// https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html
#![cfg_attr(
    not(all(doc, feature = "_docsrs_stable")), // if features are incomplete…
    allow(rustdoc::broken_intra_doc_links) // …allow broken intra-doc links
)]
//
// environment
//
#![cfg_attr(not(feature = "std"), no_std)]
// #![no_implicit_prelude] //?
//
// safety
//
#![cfg_attr(feature = "safe", forbid(unsafe_code))]
//
// nightly
//
// In sync with Cargo.toml::nightly & build/features.rs::NIGHTLY
#![cfg_attr(feature = "nightly_allocator", feature(allocator_api))]
#![cfg_attr(feature = "nightly_autodiff", feature(autodiff))]
#![cfg_attr(feature = "nightly_bigint", feature(bigint_helper_methods))]
#![cfg_attr(feature = "nightly_coro", feature(coroutines, coroutine_trait, iter_from_coroutine))]
#![cfg_attr(feature = "nightly_doc", feature(doc_cfg, doc_notable_trait))]
#![cfg_attr(all(feature = "nightly_doc", miri), allow(unused_attributes))]
#![cfg_attr(all(feature = "nightly_doc", not(doc)), allow(unused_attributes))]
#![cfg_attr(feature = "nightly_float", feature(f16, f128))]
#![cfg_attr(feature = "nightly_simd", feature(portable_simd))]
// "nightly_stable" includes:
#![cfg_attr( // 1.85
    feature = "nightly_stable_next1",
    feature(
        async_closure,
        build_hasher_default_const_new,
        const_align_of_val,
        // const_collections_with_hasher, // ?
        const_maybe_uninit_write,
        const_nonnull_new,
        const_size_of_val,
        const_swap,
        coverage_attribute,
        do_not_recommend, // diagnostics
        extended_varargs_abi_support,
        noop_waker,
        num_midpoint,
        ptr_fn_addr_eq,
    )
)]
// #![cfg_attr( // 1.86
//     feature = "nightly_stable_next2",
//     feature()
// )]
#![cfg_attr( // 1.??
    feature = "nightly_stable_later",
    feature(
        asm_goto,
        // box_uninit_write, // ?
        cell_update,
        const_array_from_ref,
        const_is_char_boundary,
        const_slice_flatten,
        const_slice_from_ref,
        const_str_split_at,
        derive_coerce_pointee,
        get_many_mut, // get_disjoint_mut (new name)
        // hash_extract_if, // ?
        impl_trait_in_assoc_type,
        isqrt,
        let_chains,
        macro_metavar_expr,
        naked_functions,
        // new_zeroed_alloc, // ?
        num_midpoint_signed,
        trait_upcasting,
        unbounded_shifts,
        unsafe_cell_from_mut,
    )
)]
// #![cfg_attr( // 1.?? not(miri)
//     all(not(miri), feature = "nightly_stable_later"), feature() )]

/* global safeguards */

// environment
#[cfg(all(feature = "std", feature = "no_std"))]
compile_error!("You can't enable the `std` and `no_std` features at the same time.");
// safety
#[cfg(all(
    feature = "safe",
    // In sync with Cargo.toml::unsafe & build/features.rs::UNSAFE
    any(feature = "unsafe", // includes all 11 specific purposes below:
        feature = "unsafe_array", feature = "unsafe_async", feature = "unsafe_hint",
        feature = "unsafe_layout", feature = "unsafe_niche", feature = "unsafe_ptr",
        feature = "unsafe_slice", feature = "unsafe_str", feature = "unsafe_sync",
        feature = "unsafe_syscall", feature = "unsafe_thread",
    )
))]
compile_error!("You can't enable `safe` and any `unsafe*` features at the same time.");
// (note: you can enable `safe_*` features to prevent `unsafe` use in specific modules)

extern crate self as devela;

/* root modules */

pub mod code;
pub mod data;
pub mod lang;
pub mod media;
pub mod num;
pub mod phys;
pub mod sys;
pub mod text;
pub mod ui;
pub mod work;

/// <span class='stab portability' title='re-exported `core`'>`core`</span>
/// *Re-exported Rust `core` library.*
#[doc(inline)]
pub use ::core as _core;

pub mod _dep;
pub mod _info;

/* structural re-exports */

#[doc(hidden)]
pub use all::*;
pub mod all {
    // public items, feature-gated, visible at their origin and in `all`
    //
    //! All the crate's items re-exported flat.
    //! <br/><hr>
    //!
    //! Note that these items are already re-exported (hidden) from the root,
    //! as is every other public module's contents from their parent.
    #[allow(unused_imports)]
    #[rustfmt::skip]
    #[doc(inline)]
    pub use super::{
        code::_all::*,
        data::_all::*,
        lang::_all::*,
        media::_all::*,
        num::_all::*,
        phys::_all::*,
        sys::_all::*,
        text::_all::*,
        ui::_all::*,
        work::_all::*,
        //
        _always::*,
    };
}
mod _always {
    // public items, not as much feature-gated
    #[allow(unused_imports)]
    #[rustfmt::skip]
    pub use super::{
        code::_always::*,
        data::_always::*,
        lang::_always::*,
        media::_always::*,
        num::_always::*,
        phys::_always::*,
        sys::_always::*,
        text::_always::*,
        ui::_always::*,
        work::_always::*,
    };
}
#[doc(hidden)]
pub use _hidden::*;
mod _hidden {
    // public items, but hidden
    pub use super::sys::_hidden::*;
}
#[allow(unused_imports)]
pub(crate) use _internals::*;
mod _internals {
    // for internal use only
    #[allow(unused_imports)]
    pub(crate) use super::code::_internals::*;
}