Crate mirl

Crate mirl 

Source
Expand description

Miners Rust Lib Mirl (Mirl sounded better than Mrl)

How to get started:

use mirl::platform::framework_traits::Window;
fn main() {
    let buffer = mirl::platform::Buffer::new_empty(800, 600);
    let mut window = mirl::platform::minifb::Framework::new(
        "Example window",
        mirl::platform::WindowSettings::default(&buffer),
    );
    while window.is_open() {
        buffer.clear();

        window.update(&buffer)
    }
}

For a debugging window like Dear ImGui you can use dear_mirl_gui crate

This lib has got a ton to offer but the main attractions are in here:

§Window/Rendering Bundle (flags: minifb_backend/glfw_backend/full_backend_support):

Re-exports§

pub use platform::Buffer;

Modules§

console
Terminal stuff
constants
Useful constants -> std contains some of these internally yet doesn’t expose them for anyone else to use
directions
Directional stuff -> NESW, N NE E SE S SW W NW
extensions
Stuff that should exist by default yet doesn’t; use mirl::extensions::*; to import all of ’em
graphics
Stuff related to graphics -> Color manipulation
math
Math and collision focused stuff
misc
Stuff I didn’t know how to categorize -> Expect these objects to be moved in the future
platform
Window creation/managing, file system creation/managing
render
Rendering stuff, simple but powerful (on mirl::platform::Buffer)
time
Time related stuff

Macros§

compile_warn
Create a compile time warning using deprecation
signed_to_unsigned
Converts signed types to their unsigned versions
switch_signing
Switches between unsigned and signed versions
u1
Convert a number into a u1
u2
Convert a number into a u2
u4
Convert a number into a u4
unsigned_to_signed
Converts unsigned types to their signed versions
upgrade_type
Gives the next bigger value type excluding usize/isize

Functions§

disable_traceback
Disables the rust traceback by setting the environment variable RUST_BACKTRACE to 0
enable_traceback
Enables the rust traceback by setting the environment variable RUST_BACKTRACE to 1
enable_traceback_detailed
Enables the extended rust traceback by setting the environment variable RUST_BACKTRACE to FULL