Releases: ldesgoui/discord_game_sdk
Releases · ldesgoui/discord_game_sdk
sys-v1.0.1
Dependencies
- Updated
bindgen
to0.59
v1.0.1
v1.0.0
Breaking Changes
- "Private" feature
doc
was 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
doc
was 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
EventHandler
is now a generic parameter ofDiscord
Discord
now has a lifetime parameter- returning
iter::Collection
was replaced byimpl 'd + Traits
returns
Bug fixes
- A lot of unsafe code was considered UB by MIRI, this has been fixed
Internals
- Replaced all macros with plain Rust
DiscordInner
unfortunately 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 thelog
crate- Removed
LogLevel
as it's not used anymore Image::pixel(x, y)
was deletedset_event_handler
was deletedusize
types appearing in API were replaced byu32
for indices oru64
for file sizesOAuth2Token::scopes
returns astr
rather than an iterator- Removed derived
Copy
from structs (counter-intuitive copy of > 64 bits) - Removed
From<sys::DiscordX> for X
from structs (fromderive_from
) - Renamed some Error variants to shush clippy
Bugs
- fixed illegal mutations of
DiscordInner::event_handler
by usingUnsafeCell
Documentation
- removed underscores in EventHandler parameters
- updated doctests (still missing Lobbies and Networking)
Internals
derive_more
droppedimage
updated to^0.23.0
memchr
updated to^2.2.0
thiserror
dropped- 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
master
and 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-msvc
because 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
Discord
struct, from which you call the SDK - The rest exists in the
EventHandler
trait, in which the SDK sends you events
- Most of it exists in the
- The
enum
s have been reimplemented in Rust - The "Plain Old Data" structs are wrapped to offer idiomatic and safe interfaces
- The simple
typedef
s 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.h
usingbindgen
- C
char
s are forcefully converted to Rustu8
s - All available builtin traits should be derived or implemented
- C
- An optional
link
feature 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