mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
wip: final simplify
This commit is contained in:
parent
90ebae0f26
commit
0b9e9c0696
21 changed files with 607 additions and 544 deletions
46
src/lib.rs
46
src/lib.rs
|
|
@ -25,30 +25,32 @@ pub(crate) use ::{
|
|||
std::ops::{Add, Sub, Mul, Div},
|
||||
std::sync::{Arc, RwLock},
|
||||
std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::*},
|
||||
std::error::Error,
|
||||
std::marker::PhantomData
|
||||
};
|
||||
|
||||
#[cfg(feature = "lang")]
|
||||
pub use ::dizzle::{Usually, Perhaps, impl_default};
|
||||
/// DSL builtins.
|
||||
#[cfg(feature = "lang")] pub mod eval;
|
||||
/// Temporal dimension.
|
||||
#[cfg(feature = "time")] pub mod time;
|
||||
/// Circuit breaker for main loop.
|
||||
#[cfg(feature = "play")] pub mod exit;
|
||||
/// Thread management.
|
||||
#[cfg(feature = "play")] pub mod task;
|
||||
/// Integration with JACK audio backend.
|
||||
#[cfg(feature = "sing")] pub mod sing;
|
||||
/// Generic drawing utilities.
|
||||
#[cfg(feature = "draw")] pub mod draw;
|
||||
/// Spatial dimension.
|
||||
#[cfg(feature = "draw")] pub mod space;
|
||||
/// Color handling.
|
||||
#[cfg(feature = "draw")] pub mod color;
|
||||
/// Text handling.
|
||||
#[cfg(feature = "text")] pub mod text;
|
||||
/// Terminal output.
|
||||
#[cfg(feature = "term")] pub mod term;
|
||||
macro_rules! features {
|
||||
($($feature:literal: [ $($module:ident),* ]),*) => {
|
||||
$(
|
||||
$(
|
||||
#[cfg(feature = $feature)] mod $module;
|
||||
#[cfg(feature = $feature)] pub use $module::*;
|
||||
)*
|
||||
)*
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "lang")] pub use ::dizzle::{Usually, Perhaps, impl_default};
|
||||
|
||||
features! {
|
||||
"lang": [ eval ],
|
||||
"time": [ time ],
|
||||
"play": [ exit, task ],
|
||||
"sing": [ sing ],
|
||||
"draw": [ draw, space, layout, color ],
|
||||
"text": [ text ],
|
||||
"term": [ term ]
|
||||
}
|
||||
|
||||
/// Define a trait an implement it for various mutation-enabled wrapper types. */
|
||||
#[macro_export] macro_rules! flex_trait_mut (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue