Releases: ldesgoui/discord_game_sdk
Releases · ldesgoui/discord_game_sdk
sys-v1.0.1
Dependencies
- Updated
bindgento0.59
v1.0.1
v1.0.0
Breaking Changes
- "Private" feature
docwas renamed toprivate-docs-rs
Bug Fixes
- Panics are now catched with
std::panic::catch_unwind, the Panic Handler is not touched anymore, which was thread-unsafe.
Documentation
- Replaced an outdated message
Meta
- Github Action dependencies were updated
sys-v1.0.0
Breaking Changes
- "Private" feature
docwas renamed toprivate-doc-rs
Documentation
- Library search pathes now use a proper path append technique
- Added instructions for fixing Linux library search path
Internal
- Repository reorganization, folder was renamed
v1.0.0-rc.4
Breaking changes
EventHandleris now a generic parameter ofDiscordDiscordnow has a lifetime parameter- returning
iter::Collectionwas replaced byimpl 'd + Traitsreturns
Bug fixes
- A lot of unsafe code was considered UB by MIRI, this has been fixed
Internals
- Replaced all macros with plain Rust
DiscordInnerunfortunately has to hold structs containing function pointers to event handlers, both raising the allocations required and the final code size
Meta
- Reorganize repo
- Introduce tests that can be executed by MIRI to verify some unsafe blocks
- MIRI tests added to CI
- Compile-failing doctests introduced to ensure the validity of lifetimes in callbacks
v1.0.0-rc.3
Breaking Changes
EventHandler::on_log_message()was deleted, messages are still forwarded to thelogcrate- Removed
LogLevelas it's not used anymore Image::pixel(x, y)was deletedset_event_handlerwas deletedusizetypes appearing in API were replaced byu32for indices oru64for file sizesOAuth2Token::scopesreturns astrrather than an iterator- Removed derived
Copyfrom structs (counter-intuitive copy of > 64 bits) - Removed
From<sys::DiscordX> for Xfrom structs (fromderive_from) - Renamed some Error variants to shush clippy
Bugs
- fixed illegal mutations of
DiscordInner::event_handlerby usingUnsafeCell
Documentation
- removed underscores in EventHandler parameters
- updated doctests (still missing Lobbies and Networking)
Internals
derive_moredroppedimageupdated to^0.23.0memchrupdated to^2.2.0thiserrordropped- removed some useless lifetime annotations
- added some safety comments in methods/core.rs and macros.rs
- implemented upcasting (
utils::AsAny) to offer dowcasting API overEventHandler - num casting is handled explicitly (panic if u32 <-> i32 fails, u32::max if buffer size is too big)
- more explicit pointer casting
Meta
- CI now only runs on
masterand pull requests - GitHub issue labels have been updated, release notes will match categories
- https://github.com/actions-rs/clippy-check will annotate warnings
New Features
- Added
Discord::replace_event_handler(Box<dyn EventHandler>) -> Option<Box<dyn EventHandler>> - Added
Discord::take_event_handler() -> Option<Box<dyn EventHandler>> - Added
Discord::downcast_event_handler<T: Any>() -> Option<&mut T> - Added
<dyn EventHandler>::downcast_ref() - Added
<dyn EventHandler>::downcast_mut()
v1.0.0-rc.2
Fixed
- Replaced sys struct instantiation with
::default()then mutation (provoked compilation errors oni686-pc-windows-msvcbecause of included padding fields)
v1.0.0-rc.1
What about pre 1.0?
I was displeased with the commit history and general uncleanliness, I've decided to archive it to a different branch and start anew, I hope this won't bother anyone. These change logs will reflect on this decision by not referrencing the previous versions.
Added
- The entirety of the Discord Game SDK API is exposed through safe means
- Most of it exists in the
Discordstruct, from which you call the SDK - The rest exists in the
EventHandlertrait, in which the SDK sends you events
- Most of it exists in the
- The
enums have been reimplemented in Rust - The "Plain Old Data" structs are wrapped to offer idiomatic and safe interfaces
- The simple
typedefs have been included to help with legibility - Callback methods accept Rust closures
- SDK methods exposing collections item by item are available in Iterator form
- Everything contains documentation, most API methods contain doctests (some Errors and Debug Panics missing)
- Optional dependency
image: Provides a conversion from our Image to image::RgbaImage
sys-v1.0.0-rc.1
What about pre 1.0?
I was displeased with the commit history and general uncleanliness, I've decided to archive it to a different branch and start anew, I hope this won't bother anyone. These change logs will reflect on this decision by not referrencing the previous versions.
Added
- Bindings are generated from
discord_game_sdk.husingbindgen- C
chars are forcefully converted to Rustu8s - All available builtin traits should be derived or implemented
- C
- An optional
linkfeature provides linkage configuration on all supported platforms (Linux, Mac OS, Windows 64 bit, Windows 32 bit) - Descriptive errors appear when developer actions are required
- Compilation is tested in Github Actions