Utilities I use across projects.
env_config_macro- adds theenv_config!macro for easy environment and file-based configurationbevy_support- adds Bevy types (Vec2,Vec3,Vec4) support for some operationstrace_err- adds theTraceErrortrait for tracingResult'sErr
kaiv_utils is a small collection of convenience utilities and helper macros reused across my personal Rust projects.
It’s meant to stay tiny, dependency-light, and Git-only - not published to crates.io.
wrappers!- macro to create simple wrapper structs with automaticDeref,DerefMutandFromimplementationsexp_decay- exponential decay interpolation forf32and (optionally) Bevy’sVec2,Vec3,Vec4ping_pong_rem- "ping-pong" remainder for integer typesinspect_none- call a fn ifOptionisNonemodule_import_prelude!- macro to makepreludemodule less painful
env_config!- macro to define global configuration structs with lazy loading, env parsing, and defaults
TraceError- trait, that provides tracing forResult'sErrwith msgs and optional unwrappingtrace_err,trace_err_msg,expect_trace_errexpect_trace_err_msg
These utilities are small, experimental, and evolve quickly.
I prefer to version them alongside projects rather than maintaining crates.io releases.
Add this dependency to your Cargo.toml:
[dependencies]
kaiv_utils = { git = "https://github.com/kaiv-dev/kaiv_utils.git", branch = "main" }