v6.1.0
·
10 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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
nogifCargo feature. raylib 6.0 dropped its built-in GIF recorder
upstream (the rcore module no longer referencesSUPPORT_GIF_RECORDING), so
the feature had no functional effect since the 6.0 bump. Drop the feature from
yourCargo.toml; nothing replaces it.
Raylib C example for recording.
Fixed
noscreenshotfeature now actually works on Linux (#40). The 6.0 build
routed it through raylib'sCUSTOMIZE_BUILD=ONCMake switch, which also
definesEXTERNAL_CONFIG_FLAGSand makes raylib'sconfig.hskip its entire
defaults block. EverySUPPORT_*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-definesSUPPORT_SCREEN_CAPTURE=0directly on the C compile line via
cflag, soconfig.h's#ifndefguard 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_controlfeature was a no-op since the 6.0 bump. The build
usedbuilder.define("SUPPORT_CUSTOM_FRAME_CONTROL", "ON"), which sets a
CMake variable that only reaches the C compiler whenCUSTOMIZE_BUILD=ONis
also set (and that path is the same one that brokenoscreenshot). Switched
to the samecflag("-DSUPPORT_CUSTOM_FRAME_CONTROL=1")approach so the
feature actually flips the#if SUPPORT_CUSTOM_FRAME_CONTROLguards 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. Thesola-raylib-sysREADME's
table now points here. - New mdBook under
book/for long-form
recipes. First chapterbook/src/web.mdwalks through wasm
builds end to end: toolchain, the canonical.cargo/config.toml, the
game_loop::runvs Asyncify tradeoff, asset bundling, save data, audio,
deploy, pitfalls. Top-level README and thelib.rscrate docs link to it.
Closes #34.
Added
- Cross-platform game-loop helper
sola_raylib::core::game_loop::run.
Native: drives the standardwhile !rl.window_should_close()loop. On
wasm32-unknown-emscripten: registers the per-frame closure with
emscripten_set_main_loop_argso you don't need-sASYNCIFY=1just for the
loop. Same source for both.examples/hello_raylib.rsdemonstrates it. - Wasm build recipe is now in-tree. Cargo silently drops
cargo:rustc-link-argfrom rlib build scripts, soraylib-syscannot 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.mdand 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. RaylibBuildernow exposes every raylib 6.0ConfigFlagsvalue as a
dedicated builder method, so callers don't need to drop toSetConfigFlags
for options the builder didn't cover. New methods:borderless_windowed()(FLAG_BORDERLESS_WINDOWED_MODE) for a
fullscreen-sized chromeless window. Friendlier than exclusivefullscreen()
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()recommendingborderless_windowed()on modern
platforms.