| Crates.io | mirl |
| lib.rs | mirl |
| version | 8.0.0 |
| created_at | 2024-12-21 01:33:53.949554+00 |
| updated_at | 2025-12-10 03:44:26.181743+00 |
| description | Miners Rust Lib - A massive collection of ever growing and changing functions, structs, and enums. Check the description for compatibility and toggleable features! (Most of the lib is controlled by flags/features so the lib can continue to be lightweight despite its size) |
| homepage | |
| repository | https://github.com/Miner3D-Gamer/mirl |
| max_upload_size | |
| id | 1490691 |
| size | 1,148,225 |
Miners Rust Lib - A modular utility library featuring windowing, 2D rendering, input handling, color manipulation, system integration, math utilities, extensive type extensions, and more. Content is listed at the bottom.
minifb/glfw/all_backends):If you want to enable everything this library has to offer you can use the
allflag
MiniFB is recommended but every backend has their own unique limitations/quirks which is the reason this lib exists in the first place
use mirl::platform::framework_traits::Window;
fn main() {
let mut buffer = mirl::platform::Buffer::new_empty((800, 600));
let mut window = mirl::platform::{minifb/glfw}::Framework::new(
"Example window",
mirl::platform::WindowSettings::default(&buffer),
).unwrap();
while window.is_open() {
buffer.clear();
// Draw here, use mirl::render for simple presets/helper functions
window.update(&buffer);
}
}
For a debugging window lib "similar" to Dear ImGui you can use the dear_mirl_gui crate (which is RmMode)
| Platform | Status | Info |
|---|---|---|
| Windows | ✅ Full | Native implementation |
| Linux | ❌ Partial | Currently fixing |
| macOS | ❓ Partial | Untested; cargo check passes. |
| Web | ❓ Partial | Untested; cargo check passes. |
default-features = false)texture_manager_cleanup - Adds extra cleanup logic for 'automatic' texture unloadingnum_traits - Enables num-traits dependency which is relied on by many functions and structs for modular number supportstd - Enables the default rust lib which most of the lib relies onimagery - Enables support for the image crate for image loadingsvg - Enables SVG rasterization via the resvg and tempfile crates (used for things like cursor support)minifb - Enables the framework backend using minifb and requires low-level system accessglfw - Enables the framework backend using glfw, OpenGL, and requires low-level system accessfont_support - Adds support for fontdue and uses once_cell for font rendering logicsystem - Low-level system interaction using platform-specific crates (x11, windows, winapi, raw-window-handle)all_backends - Enables all major backends: minifb_backend, glfw_backend, and keycode_supportall - Enables all major features: default, imagery, full_backend_support, discord, and randomkeycodes - Enables the ability to interact with keyboardkeyboard_query - Get the currently pressed keys -> Required for MiniFBcursor_show_hotspot - A debug option for adding a red dot to the hotspot of a customly loaded cursordiscord - Support for sending stuff to discord webhooksparking_lot - Enables the parking_lot dependency for more efficient synchronization primitivesahash - Enables the ahash dependency for faster HashMap implementationsrandom - Enables random number generation supportThis lib is heavily guided by clippy and as such:
Buffer - ARGB u32 pixel buffer with manipulation operationsU1, U2, U4 - sub-byte unsigned integers with num-traits supportUniformRange - normalized [0.0, 1.0] float representationPoint2D and Point3D - 2D and 3D point structuresTryFromPatch with Number, HashMap, BTreeMap, Vec, and String conversionsEasyUnwrapUnchecked, used when you know that a value isn't None using .easy_unwrap_unchecked (Skips the unsafe {} step)What do the version numbers mean?
Patch: You can update the lib without any changes to your code
Minor: You can probably update safely but there is a chance of something erroring
Major: You will most likely have to fix something
Note that these rules do not apply to modules (and sub modules) named
misc, they are collections of objects that have not yet been assigned a proper place to stay
What brought you to this strange place?
This is just a little big lib I built for easy function/struct/etc. reusability across my never ending stream of unfinished projects. Even if many of the functions in here will never be used again, considering there are ~3.5k functions, ~25 enums, ~60 structs, ~200 traits, ~1.3 trait implementations; you are sure to find something of use
My philosophy follows 3 things:
You can find the most random yet oddly specific things here. Enjoy! Or don't, honestly...
If you use the lib in a public project, let me know; I'd genuinely love to see what other people create with the lib
The lib was created on the 21.12.2024.
At the time of writing it is the 1.12.2025. (I will not update this frequently)
Having existed for almost a year here are the stats (pub only):
| Type | Amount | Average per day | Average per year | Coverage |
|---|---|---|---|---|
| functions | 3545 | 9.98 | 3644.85 | 60.20% |
| implementations | 1296 | 3.65 | 1332.50 | 22.01% |
| traits | 205 | 0.57 | 210.77 | 3.48% |
| enums | 25 | 0.07 | 25.70 | 0.42% |
| structs | 67 | 1.88 | 68.88 | 1.13% |
| statics | 2 | 0.005 | 2.05 | 0.03% |
| consts | 155 | 0.43 | 159.36 | 2.63% |
| macros | 8 | 0.02 | 8.22 | 0.13% |
| modules | 55 | 0.15 | 56.54 | 64.45 fn per mod |
(Not displayed: Types)