BREAKING
-
RaylibHandle::load_shaderandload_shader_from_memoryare now fallible
(#51). Both returnResult<Shader, Error>instead ofShader. raylib
silently logs a warning and substitutes the default shader when a file is
missing or a shader fails to compile, so the old signatures made those
failures look like success.load_shadernow also checks each provided path
exists before calling raylib, necessary because a missing file comes back as
the (valid, non-zero) default shader id and is otherwise undetectable. This is
a breaking signature change, but a loud, compile-time one: add?or
.unwrap()at the call site.// before let shader = rl.load_shader(&thread, None, Some("grayscale.fs")); // after let shader = rl.load_shader(&thread, None, Some("grayscale.fs"))?;
Caveat: a vertex/fragment pair that compiles individually but fails to link
still slips through, since raylib reassigns the default shader id internally
and the failure can't be observed from the binding. -
Image::load_image_animandload_image_anim_from_memoryare now
fallible (#51). Both returnResult<Image, Error>instead ofImage,
checking for the nulldataraylib hands back on failure. This brings them in
line with their non-animated siblings (load_image,load_image_raw,
load_image_from_mem), which already returnedResult. Add?or
.unwrap()at the call site.
Added
RaylibHandle::request_quit. Programmatic quit for the
sola_raylib::core::game_loop::runhelper (and any hand-rolled
while !rl.window_should_close()loop). Wire it up to a quit menu item,
gamepad button, "game over" transition, etc.window_should_closereturns
true on the next check; on emscripten the registered main loop is cancelled on
the next frame. The default ESC / window-close-button paths still work exactly
as before. The existingset_exit_keyAPI remains the way to change or
disable the default exit key.
Fixed
- Windows MSVC builds now work from a plain shell (#56). When
configure_windows_cmake_generatorpicked Ninja (auto-selected whenninja
is onPATH), cmake invokedcl.exedirectly and failed to find
<windows.h>unless you'd launched cargo from a Developer Command Prompt or
runvcvars*.batfirst. The build script now uses
cc::windows_registry::find_toolto locate the MSVC toolchain and injects its
INCLUDE/LIB/PATHinto the build env. No-op if you're already in a
vcvars shell (INCLUDEis set) or targeting a non-msvc target. Thanks to
@lofcz. - The
sdlfeature now links the correct SDL version on Windows (#57).
The build script decided between SDL2 and SDL3 by probingpkg-config, which
Windows does not ship, so it always fell through to linking SDL2 regardless of
what raylib's CMake actually compiled against. It now reads raylib's resolved
choice from the generatedraylib-config.cmake(find_dependency(SDL3 ...)
vsSDL2) and links the matching library, on every platform and with no
pkg-config dependency.