Skip to content

v6.1.0

Choose a tag to compare

@brettchalupa brettchalupa released this 07 May 17:22
· 10 commits to main since this release
Immutable release. Only release title and notes can be modified.
ac0fa68

sola-raylib 6.1.0 is a smaller release that's mostly centered around cleaning things up
following the 6.0.0 release. It fixes the noscreenshot feature, improves the docs, and
tries to make it easier to develop for WASM.

Get the latest version at https://crates.io/crates/sola-raylib

Removed

  • nogif Cargo feature. raylib 6.0 dropped its built-in GIF recorder
    upstream (the rcore module no longer references SUPPORT_GIF_RECORDING), so
    the feature had no functional effect since the 6.0 bump. Drop the feature from
    your Cargo.toml; nothing replaces it.
    Raylib C example for recording.

Fixed

  • noscreenshot feature now actually works on Linux (#40). The 6.0 build
    routed it through raylib's CUSTOMIZE_BUILD=ON CMake switch, which also
    defines EXTERNAL_CONFIG_FLAGS and makes raylib's config.h skip its entire
    defaults block. Every SUPPORT_* macro then went undefined (rtextures,
    partialbusy wait, gestures, etc.), so the window mapped but never rendered on
    X11/XWayland and failed to appear at all on native Wayland. The fix
    pre-defines SUPPORT_SCREEN_CAPTURE=0 directly on the C compile line via
    cflag, so config.h's #ifndef guard short-circuits while every other
    default flows through normally. The F12 keybind is gone from the compiled
    libraylib.a, rendering and Wayland init are unaffected.
  • custom_frame_control feature was a no-op since the 6.0 bump. The build
    used builder.define("SUPPORT_CUSTOM_FRAME_CONTROL", "ON"), which sets a
    CMake variable that only reaches the C compiler when CUSTOMIZE_BUILD=ON is
    also set (and that path is the same one that broke noscreenshot). Switched
    to the same cflag("-DSUPPORT_CUSTOM_FRAME_CONTROL=1") approach so the
    feature actually flips the #if SUPPORT_CUSTOM_FRAME_CONTROL guards in
    rcore.c (SwapScreenBuffer, PollInputEvents, frame-time wait become
    user-driven, as documented).

Documentation

  • New canonical "Cargo features" section in the top-level README listing every
    feature, its default state, and platform notes. The sola-raylib-sys README's
    table now points here.
  • New mdBook under book/ for long-form
    recipes. First chapter book/src/web.md walks through wasm
    builds end to end: toolchain, the canonical .cargo/config.toml, the
    game_loop::run vs Asyncify tradeoff, asset bundling, save data, audio,
    deploy, pitfalls. Top-level README and the lib.rs crate docs link to it.
    Closes #34.

Added

  • Cross-platform game-loop helper sola_raylib::core::game_loop::run.
    Native: drives the standard while !rl.window_should_close() loop. On
    wasm32-unknown-emscripten: registers the per-frame closure with
    emscripten_set_main_loop_arg so you don't need -sASYNCIFY=1 just for the
    loop. Same source for both. examples/hello_raylib.rs demonstrates it.
  • Wasm build recipe is now in-tree. Cargo silently drops
    cargo:rustc-link-arg from rlib build scripts, so raylib-sys cannot inject
    linker flags into a downstream binary's link step. The flags raylib needs
    (-sUSE_GLFW=3, -sASYNCIFY=1, -sFORCE_FILESYSTEM=1,
    -sSUPPORT_LONGJMP=wasm, -sEXPORTED_RUNTIME_METHODS=...,
    -sALLOW_MEMORY_GROWTH=1) live in the consumer's .cargo/config.toml. See
    book/src/web.md and the copyable
    examples/.cargo/config.toml. raylib's own C
    compiles cleanly under rustc 1.93+'s default link ABI; if you have your own
    C/C++ deps via cc-rs, add
    CFLAGS_wasm32_unknown_emscripten = "-fwasm-exceptions -sSUPPORT_LONGJMP=wasm"
    to your [env] block.
  • RaylibBuilder now exposes every raylib 6.0 ConfigFlags value as a
    dedicated builder method, so callers don't need to drop to SetConfigFlags
    for options the builder didn't cover. New methods:
    • borderless_windowed() (FLAG_BORDERLESS_WINDOWED_MODE) for a
      fullscreen-sized chromeless window. Friendlier than exclusive fullscreen()
      on modern desktops (no mode switch, fast Alt+Tab, plays well with
      multi-monitor and notifications).
    • hidden(), minimized(), maximized(), unfocused(), topmost(),
      always_run(), mouse_passthrough() covering the rest of the
      FLAG_WINDOW_* family.
    • interlaced() (FLAG_INTERLACED_HINT) for 3D TV setups.
  • Improve Emscripten support for building for WASM from Windows.
  • Doc note on fullscreen() recommending borderless_windowed() on modern
    platforms.