Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Mirl
Miners Rust Lib – A modular utility library featuring windowing, 2D rendering, input handling, color manipulation, system integration, math utilities, and extensive type extensions. Overview at the bottom
Compatibility
| Platform | Status | Info |
|---|---|---|
| Windows | ✅ Full | Native implementation |
| Linux | ⚠️ Partial | Currently fixing |
| macOS | 🚧 Barely | Untested |
| Web | ⚠️ Partial | Everything but IO should work |
How to get started (flags: minifb/glfw/all_backends):
MiniFB is recommended but every backend has their own unique limitations/quirks which is the reason this lib exists in the first place
use Window;
For a debugging window lib "similar" to Dear ImGui you can use the dear_mirl_gui crate (which is RmMode)
Features/Flags
Default (disabled with default-features = false)
texture_manager_cleanup– Adds extra cleanup logic for 'automatic' texture unloading
Optional
imagery– Enables support for theimagecrate for image loadingsvg– Enables SVG rendering via theresvgandtempfilecrates (used for things like cursor support)minifb– Enables the framework backend usingminifband requires low-level system accessglfw– Enables the framework backend usingglfw, OpenGL, and requires low-level system accessfont_support– Adds support forfontdueandonce_cellfor font renderingsystem– Low-level system interaction using platform-specific crates (x11,windows,winapi,raw-window-handle)all_backends– Enables all major backends:minifb_backend,glfw_backend,keycode_support, andsvgall– Enables all commonly used features:default,imagery, andfull_backend_supportf128- Enables support for 128-bit floating point numbers since they are not yet stablekeycodes- Enables the ability to interact with keyboarddo_not_compile_misc- Stops the experimental misc module from compilingkeyboard_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 webhooks
Other
This lib is heavily guided by clippy and as such:
- Almost everything has a short docstring
- Execution stopping functions/macros like panic! or unwrap() are only ever used in custom panic/unwrap functions
To add:
- Clipboard support
- Sound support
- More terminal functionality
- Network support
Content
Core Types & Buffer Management
Buffer- ARGBu32pixel buffer with manipulation operations- Pixel-level operations (safe/unsafe accessors)
- Buffer transformations (flip, rotate, trim, resize)
- Collision detection from buffers
Windowing & Platform
- Multi-backend window system
- Window manipulation (position, size, opacity, z-order, visibility, borderless, etc.)
- Input handling (keyboard, mouse, raw input)
- Custom cursor loading and management
- File system abstraction
- Platform-specific features (Windows focus)
Graphics & Rendering
- 2D Rendering
- Text (standard, antialiased, stretched)
- Shapes (rectangles, circles, triangles, lines)
- Buffer-to-buffer blitting
- Color Utilities
- RGB/HSL conversion and manipulation
- Hex/ARGB conversion
- Color interpolation and shifting
- Brightness and saturation adjustment
- Image Processing
- Multiple interpolation modes (Nearest, Linear, Cubic, Lanczos, Gaussian, etc.)
- Image resizing and filtering
- SVG rasterization
- Format conversion (BMP, ICO, CUR generation)
- Texture Management
- Lazy loading and caching
- Automatic cleanup of unused textures
System Integration
- Window Control (Windows-specific)
- Window positioning and sizing
- Minimization, maximization, restoration
- Z-order and window level management
- Opacity and click-through
- Taskbar progress indicators
- System Actions
- Screen capture (full screen, desktop background)
- CPU priority control
- Screen resolution queries
Math & Geometry
- Collision Detection
- Rectangle-rectangle intersection
- Circle-rectangle collision
- Point containment tests
- Number Types
U1,U2,U4- sub-byte unsigned integers withnum-traitssupportUniformRange- normalized [0.0, 1.0] float representation
- Math Extensions
- Vector normalization and interpolation
- Bounded type traits
- Angle conversions (degrees/radians)
Extensions & Utilities
- List Operations
- Finding differences, duplicates, regions
- Push-or-replace for max-sized lists
- Averaging and combining
- String Extensions
- Text justification and centering
- Tab expansion
- Number validation
- Cell & Tuple Operations
- Saturating arithmetic
- Clamping and sign manipulation
- Tuple-wise operations and comparisons
- Type Conversions
- Tuple into conversions (const and runtime)
- Result mapping helpers
- Sign/unsigned mapping
Miscellaneous
- Discord Integration - Webhook payloads with embeds, components, and attachments
- Keybinding System - Action-based keybind handling with priority
- Direction Types - Cardinal and extended directions with rotation
- Scrollable Camera - 2D viewport with scroll bounds
- Console Utilities - Colored output and input handling
- Time Constants - Duration conversion helpers
Hi there
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 ~3k functions, ~50 enums, ~100 structs, ~100 traits, ~500 trait implementations; you are sure to find something of use
My philosophy follows 3 things:
- Modularity: Why put a limit on things?
- Usability What is something worth when it's unusable?
- Speed: No questions. More speed more better.
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