tyche/
lib.rs

1#![doc = pretty_readme::docify!("README.md", "https://docs.rs/tyche/latest/tyche/", "./")]
2#![cfg_attr(not(any(doc, test)), no_std)]
3#![expect(
4	clippy::tabs_in_doc_comments,
5	reason = "Consistency with source, user-configurability & accessibility"
6)]
7#![deny(macro_use_extern_crate, meta_variable_misuse, unit_bindings)]
8#![warn(
9	explicit_outlives_requirements,
10	missing_docs,
11	missing_debug_implementations,
12	unreachable_pub,
13	unused_crate_dependencies,
14	unused_qualifications,
15	clippy::pedantic,
16	clippy::absolute_paths,
17	clippy::alloc_instead_of_core,
18	clippy::allow_attributes,
19	clippy::allow_attributes_without_reason,
20	clippy::arithmetic_side_effects,
21	clippy::cfg_not_test,
22	clippy::clone_on_ref_ptr,
23	clippy::cognitive_complexity,
24	clippy::dbg_macro,
25	clippy::doc_include_without_cfg,
26	clippy::empty_enum_variants_with_brackets,
27	clippy::empty_structs_with_brackets,
28	clippy::exhaustive_enums,
29	clippy::exhaustive_structs,
30	clippy::exit,
31	clippy::expect_used,
32	clippy::field_scoped_visibility_modifiers,
33	clippy::filetype_is_file,
34	clippy::fn_to_numeric_cast_any,
35	clippy::get_unwrap,
36	clippy::if_then_some_else_none,
37	clippy::infinite_loop,
38	clippy::lossy_float_literal,
39	clippy::map_err_ignore,
40	clippy::map_with_unused_argument_over_ranges,
41	clippy::missing_const_for_fn,
42	clippy::missing_docs_in_private_items,
43	clippy::multiple_inherent_impl,
44	clippy::mutex_atomic,
45	clippy::needless_raw_strings,
46	clippy::non_zero_suggestions,
47	clippy::panic_in_result_fn,
48	clippy::pathbuf_init_then_push,
49	clippy::pointer_format,
50	clippy::precedence_bits,
51	clippy::print_stderr,
52	clippy::print_stdout,
53	clippy::pub_without_shorthand,
54	clippy::rc_buffer,
55	clippy::rc_mutex,
56	clippy::redundant_test_prefix,
57	clippy::redundant_type_annotations,
58	clippy::ref_patterns,
59	clippy::renamed_function_params,
60	clippy::rest_pat_in_fully_bound_structs,
61	clippy::return_and_then,
62	clippy::same_name_method,
63	clippy::self_named_module_files,
64	clippy::semicolon_inside_block,
65	clippy::std_instead_of_alloc,
66	clippy::std_instead_of_core,
67	clippy::str_to_string,
68	clippy::string_lit_chars_any,
69	clippy::suspicious_xor_used_as_pow,
70	clippy::tests_outside_test_module,
71	clippy::try_err,
72	clippy::undocumented_unsafe_blocks,
73	clippy::unnecessary_safety_comment,
74	clippy::unnecessary_safety_doc,
75	clippy::unnecessary_self_imports,
76	clippy::unneeded_field_pattern,
77	clippy::unused_result_ok,
78	clippy::unwrap_in_result,
79	clippy::unwrap_used,
80	clippy::verbose_file_reads
81)]
82
83extern crate alloc;
84extern crate core;
85
86pub mod dice;
87pub mod expr;
88#[cfg(feature = "parse")]
89pub mod parse;
90
91pub use dice::Dice;
92pub use expr::Expr;
93#[cfg(feature = "parse")]
94pub use parse::expr as parser;
95
96#[cfg(test)]
97mod tests;
98
99#[cfg(feature = "build-binary")]
100use ariadne as _;