# https://doc.rust-lang.org/cargo/reference/manifest.html # ============================================================================== [workspace] members = [".", "macros"] [lib] # path = "./src/lib.rs" bench = false [package] name = "devela" description = "A development foundation." version = "0.21.2" edition = "2021" rust-version = "1.80.1" # sync with readme & .github/workflows/check.yml authors = ["José Luis Cruz "] repository = "https://github.com/andamira/devela" documentation = "https://docs.rs/devela" license = "MIT OR Apache-2.0" include = [ "/Cargo.toml", "/DOCS/*", "/build/**/*.rs", "/src/**/*.rs", "/src/**/*.md", "/examples/bitfield.rs", "/examples/enumset.rs", "/examples/cargo_script.rs", "/examples/coro_run.rs", "/examples/cli_prompt.rs", ] categories = ["development-tools", "rust-patterns", "no-std::no-alloc"] keywords = ["dev", "helper", "library", "std", "extension"] build = "build/mod.rs" publish = true [features] # 198 (300 max) # https://doc.rust-lang.org/cargo/reference/features.html # ============================================================================== # Features are grouped in the following categories: # - Miscellaneous # - Environment # - Modules # - Safety # - Nightly # - Capability # - Dependencies # # Sintax: # - ["name"]: Normal public-facing features. # - ["_name"]: Hidden extra capability features. # - ["__name"]: Hidden miscellaneous features. # # Features are in sync with: build/features.rs and src/_info/features.md #* Miscellaneous features *# # ------------------------------------------------------------------------------ # default = [] __dbg = [] # for debugging purposes, shows enabled features __no_test = [] # allows excluding examples from being tested #* Environment features *# # ------------------------------------------------------------------------------ alloc = [ # enables `alloc` functionality "bytemuck/extern_crate_alloc", "memchr?/alloc", "rand_core?/alloc" ] std = [ # disables `no_std` compatibility and enables `std` functionality "alloc", "atomic?/std", "bytemuck/extern_crate_std", "log?/std", "memchr?/std", "rand_core?/std", "wide?/std", ] no_std = [ # enables functionality incompatible with or substitute of `std` ] #* Modules features trees *# # ------------------------------------------------------------------------------ all = [ # enables all the modules and submodules "code", "data", "exec", "mem", "num", "sys", "text", "time", ] code = [] data = [] exec = ["bytemuck/zeroable_atomics"] mem = [ "mem_bit", ] mem_bit = [] # BitSize num = [ "num_geom", "num_rand", ] num_geom = [] # geometric types and operations. num_rand = [] # random number generators. sys = [] text = ["_non_value_u8", "_non_value_u16"] time = [] #* Safety features trees *# # ------------------------------------------------------------------------------ # To use unsafe functionality: # 1. enable the desired `unsafe` feature. # 2. don't enable the `safe` feature for that module. safe = [ # forbids `unsafe` (and overrides unsafe features) "safe_code", "safe_data", "safe_exec", "safe_mem", "safe_num", "safe_sys", "safe_text", "safe_time", ] # in specific modules: safe_code = [] safe_data = [] safe_exec = [] safe_mem = [] safe_num = [] safe_sys = [] safe_text = [] safe_time = [] unsafe = [ # enables `unsafe` (as long as it isn't forbidden in the module) "unsafe_array", "unsafe_async", "unsafe_const", "unsafe_dyn", "unsafe_niche", "unsafe_ptr", "unsafe_slice", "unsafe_str", "unsafe_thread", ] # for specific purposes: unsafe_array = [] # faster array initialization, UninitArray. unsafe_async = [] # task_waker_noop, CoroRun. unsafe_const = [] # extra const methods. unsafe_dyn = [] # DSTs in the stack, no_std Error dyn impls, ExtAny::downcast*. unsafe_niche = [] # unchecked niche constructors. unsafe_ptr = [] # Pinned, pop methods without Clone. unsafe_slice = [] # extra slice methods, avoid bound checks. unsafe_str = [] # unchecked utf-8 char and &str conversions. unsafe_thread = [] # Logging::set_logger_racy. #* Nightly features tree *# # ------------------------------------------------------------------------------ nightly = [ "nightly_coro", "nightly_doc", "nightly_simd", "nightly_stabilized", ] # enables all the following features: nightly_coro= [] # coroutines, coroutine_trait, iter_from_coroutine nightly_doc = [] # doc_cfg, doc_notable_trait nightly_simd = [] # portable_simd nightly_stabilized = [] # stabilized features to be released soon: # - https://github.com/rust-lang/rust/milestones # - https://releases.rs/ # # WAIT: # ? [noop_waker](https://github.com/rust-lang/rust/issues/98286) exec::async::waker # ? [macro_metavar_expr](https://github.com/rust-lang/rust/pull/122808) # ? [impl_trait_in_assoc_type](https://github.com/rust-lang/rust/pull/120700) # ? [offset_of_nested](https://github.com/rust-lang/rust/pull/128284) #* Capability features *# # ------------------------------------------------------------------------------ # These features are prefixed with an underscore (_) and therefore semi-hidden. # # Enabling them enables extra implementations which increases compilation times. # # They also set automatic compile flags named `_some_*`, used for reflection. # E.g.: the flag `_some_stack` will be set if some _stack_* feature is enabled. _default = [] # default capabilities _max = [ # the maximum capabilities "_max_docs", "_tuple_72"] _min_docs = [ # the minimum capabilities to document all library items "all", # data: "_bit_u8", "_destaque_u8", "_stack_u8", "_graph_u8", "_tuple", # num: "_cmp_u8", "_float_f32", "_int_u8", "_non_value_u8", "_non_range_u8", "_in_range_u8", # text: "_string_u8", "_string_nonul", ] _max_docs = [ # the maximum capabities relevant for documentation "_data_all", "_num_all", "_text_all"] # The most complete versions of the documentation: _docsrs_stable = ["std", "unsafe", "dep_all", "_min_docs"] _docsrs = ["_docsrs_stable", "nightly"] #* data capabilities *# # --------------------- _data_all = ["_bit_all", "_collections_all", "_tuple", "_sort_all"] # `Bitwise`, `bitfield`, `enumset`: _bit_all = [ "_bit_i8", "_bit_i16", "_bit_i32", "_bit_i64", "_bit_i128", "_bit_isize", "_bit_u8", "_bit_u16", "_bit_u32", "_bit_u64", "_bit_u128", "_bit_usize"] _bit_i8 = [] _bit_i16 = [] _bit_i32 = [] _bit_i64 = [] _bit_i128 = [] _bit_isize = [] _bit_u8 = [] _bit_u16 = [] _bit_u32 = [] _bit_u64 = [] _bit_u128 = [] _bit_usize = [] # `Destaque*`, `Graph*`, `Node*`, `Stack*`, `Tuple`: _collections_all = [ "_destaque_all", "_graph_all", "_node_all", "_stack_all", "_tuple" ] _destaque_all = ["_destaque_u8", "_destaque_u16", "_destaque_u32", "_destaque_usize"] _destaque_u8 = [] _destaque_u16 = [] _destaque_u32 = [] _destaque_usize = [] _graph_all = ["_graph_u8", "_graph_u16", "_graph_u32", "_graph_usize"] _graph_u8 = ["_node_u8"] _graph_u16 = ["_node_u16"] _graph_u32 = ["_node_u32"] _graph_usize = ["_node_usize"] _node_all = ["_node_u8", "_node_u16", "_node_u32", "_node_usize"] _node_u8 = ["_non_value_u8"] _node_u16 = ["_non_value_u16"] _node_u32 = ["_non_value_u32"] _node_usize = ["_non_value_usize"] _stack_all = ["_stack_u8", "_stack_u16", "_stack_u32", "_stack_usize"] _stack_u8 = [] _stack_u16 = [] _stack_u32 = [] _stack_usize = [] # `Tuple` trait and maximum arity supported (example relative compilation times) _tuple = [] # arity 12 # time: 3.3s, codegen: 96K (for >=2nd compilations) _tuple_24 = ["_tuple"] # time: 4.0s, codegen: 279K _tuple_36 = ["_tuple_24"] # time: 4.6s, codegen: 561K _tuple_48 = ["_tuple_36"] # time: 6.3s, codegen: 942K _tuple_72 = ["_tuple_48"] # time: 10.3s, codegen: 2.0M # `Sort`: _sort_all = [ "_sort_i8", "_sort_i16", "_sort_i32", "_sort_i64", "_sort_i128", "_sort_isize", "_sort_u8", "_sort_u16", "_sort_u32", "_sort_u64", "_sort_u128", "_sort_usize", "_sort_f32", "_sort_f64"] _sort_i8 = [] _sort_i16 = [] _sort_i32 = [] _sort_i64 = [] _sort_i128 = [] _sort_isize = [] _sort_u8 = [] _sort_u16 = [] _sort_u32 = [] _sort_u64 = [] _sort_u128 = [] _sort_usize = [] _sort_f32 = ["_cmp_f32"] _sort_f64 = ["_cmp_f64"] #* num capabilities *# # --------------------- _num_all = ["_nums_all", "_cmp_all", "_niche_all"] # `Compare`: _cmp_all = [ "_cmp_i8", "_cmp_i16", "_cmp_i32", "_cmp_i64", "_cmp_i128", "_cmp_isize", "_cmp_u8", "_cmp_u16", "_cmp_u32", "_cmp_u64", "_cmp_u128", "_cmp_usize", "_cmp_f32", "_cmp_f64"] _cmp_i8 = [] _cmp_i16 = [] _cmp_i32 = [] _cmp_i64 = [] _cmp_i128 = [] _cmp_isize = [] _cmp_u8 = [] _cmp_u16 = [] _cmp_u32 = [] _cmp_u64 = [] _cmp_u128 = [] _cmp_usize = [] _cmp_f32 = ["_float_f32"] _cmp_f64 = ["_float_f64"] # `[Num]Int`, `[Num]Float`, `[Num]Frac`, `Point`, `Angle`, `Vector`: _nums_all = ["_float_all", "_int_all"] _float_all = ["_float_f32", "_float_f64"] _float_f32 = [] _float_f64 = [] _int_all = ["_int_iall", "_int_uall"] _int_iall = ["_int_i8", "_int_i16", "_int_i32", "_int_i64", "_int_i128", "_int_isize"] _int_i8 = [] _int_i16 = [] _int_i32 = [] _int_i64 = [] _int_i128 = [] _int_isize = [] _int_uall = ["_int_u8", "_int_u16", "_int_u32", "_int_u64", "_int_u128", "_int_usize"] _int_u8 = [] _int_u16 = [] _int_u32 = [] _int_u64 = [] _int_u128 = [] _int_usize = [] # `NonValue*`+`NonExtreme*`, `NonRange*`, `InRange*`: _niche_all = ["_non_value_all", "_non_range_all", "_in_range_all"] _non_value_all = [ "_non_value_i8", "_non_value_i16", "_non_value_i32", "_non_value_i64", "_non_value_i128", "_non_value_isize", "_non_value_u8", "_non_value_u16", "_non_value_u32", "_non_value_u64", "_non_value_u128", "_non_value_usize"] _non_value_i8 = [] _non_value_u8 = [] _non_value_i16 = [] _non_value_u16 = [] _non_value_i32 = [] _non_value_u32 = [] _non_value_i64 = [] _non_value_u64 = [] _non_value_i128 = [] _non_value_u128 = [] _non_value_isize = [] _non_value_usize = [] _non_range_all = [ "_non_range_i8", "_non_range_i16", "_non_range_i32", "_non_range_i64", "_non_range_i128", "_non_range_isize", "_non_range_u8", "_non_range_u16", "_non_range_u32", "_non_range_u64", "_non_range_u128", "_non_range_usize"] _non_range_i8 = [] _non_range_u8 = [] _non_range_i16 = [] _non_range_u16 = [] _non_range_i32 = [] _non_range_u32 = [] _non_range_i64 = [] _non_range_u64 = [] _non_range_i128 = [] _non_range_u128 = [] _non_range_isize = [] _non_range_usize = [] _in_range_all = [ "_in_range_i8", "_in_range_i16", "_in_range_i32", "_in_range_i64", "_in_range_i128", "_in_range_isize", "_in_range_u8", "_in_range_u16", "_in_range_u32", "_in_range_u64", "_in_range_u128", "_in_range_usize"] _in_range_i8 = [] _in_range_u8 = [] _in_range_i16 = [] _in_range_u16 = [] _in_range_i32 = [] _in_range_u32 = [] _in_range_i64 = [] _in_range_u64 = [] _in_range_i128 = [] _in_range_u128 = [] _in_range_isize = [] _in_range_usize = [] #* text capabilities *# # --------------------- _text_all = ["_string_all"] # private reflexion: # StringU*, StringNonul: _string_all = [ "_string_u8", "_string_u16", "_string_u32", "_string_usize", "_string_nonul"] _string_u8 = [] _string_u16 = [] _string_u32 = [] _string_usize = [] # _string_nonul = [] #* Dependencies features *# # ------------------------------------------------------------------------------ dep_all = [ # enables all optional dependencies "atomic", "const-str", "hashbrown", "libm", "log", "memchr", "portable-atomic", "rand_core", "unicode-segmentation", "unicode-width", "wide", ] # enable groups of dependencies: dep_exec = ["atomic", "portable-atomic"] dep_text = ["const-str", "memchr", "unicode-segmentation", "unicode-width"] atomic = ["dep:atomic"] const-str = ["dep:const-str"] hashbrown = ["dep:hashbrown", "alloc"] libm = ["dep:libm"] log = ["dep:log"] memchr = ["dep:memchr"] portable-atomic = ["dep:portable-atomic"] rand_core = ["dep:rand_core"] unicode-segmentation = ["dep:unicode-segmentation"] unicode-width = ["dep:unicode-width"] wide = ["dep:wide"] [dependencies] # ============================================================================== # non-optional: devela_macros = { version = "0.10.0" } #devela_macros = { path = "./macros" } paste_crate = { package = "paste", version = "1.0.15", default-features = false } # optional: const-str = { version = "0.5.7", default-features = false, optional = true } libm = { version = "0.2.8", default-features = false, optional = true } log = { version = "0.4.22", default-features = false, optional = true } memchr = { version = "2.7.4", optional = true, default-features = false } rand_core = { version = "0.6.4", default-features = false, optional = true } unicode-segmentation = { version = "1.11.0", default-features = false, optional = true } unicode-width = { version = "0.1.13", default-features = false, optional = true } wide = { version = "0.7.26", optional = true, default-features = false } # non-optional: [dependencies.bytemuck] version = "1.16.0" optional = false default-features = false features = ["align_offset", "min_const_generics", "must_cast", "zeroable_maybe_uninit"] # optional: [dependencies.atomic] version = "0.6.0" optional = true default-features = false features = ["fallback"] [dependencies.hashbrown] version = "0.14.5" optional = true default-features = false features = ["ahash", "inline-more"] [dependencies.portable-atomic] version = "1.7.0" optional = true default-features = false features = ["fallback", "float"] [dev-dependencies] # ------------------------------------------------------------------------------ devela = { path = ".", features = ["all"] } # profiles # ============================================================================== # [profile.dev] # codegen-backend = "cranelift" # [profile.dev.package."*"] # codegen-backend = "llvm" # opt-level = 3 [package.metadata.docs.rs] # ============================================================================== no-default-features = true features = ["_docsrs", "_max_docs"] rustdoc-args = [ "--html-in-header", "./DOCS/rustdoc-header.html" ] [badges] # ============================================================================== maintenance = { status = "experimental" } [lints.rust] # ============================================================================== # https://dev-doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html # https://doc.rust-lang.org/rustc/check-cfg.html [lints.rust.unexpected_cfgs] level = "warn" check-cfg = [ # Expect more pointer widths 'cfg(target_pointer_width, values("8", "128"))', # # These compilation flags for reflection are enabled in: "/build/features.rs" "cfg(_some_nightly, _some_dep)", 'cfg(_some_mem, _some_num)', 'cfg(_some_bit, _some_destaque, _some_graph, _some_node, _some_stack)', 'cfg(_some_sort, _some_sort_int, _some_sort_float)', 'cfg(_some_nums, _some_cmp, _some_float, _some_int, _some_int_i, _some_int_u)', 'cfg(_some_niche, _some_in_range, _some_non_range)', 'cfg(_some_non_value, _some_non_value_i, _some_non_value_u)', 'cfg(_some_string, _some_string_u)', ] # examples # ============================================================================== [[example]] name = "bitfield" required-features = ["_bit_u8"] [[example]] name = "cargo_script" required-features = ["__no_test"] [[example]] name = "coro_run" required-features = ["unsafe_async", "alloc"] [[example]] name = "enumset" required-features = ["_bit_u8"]