Skip to content

Releases: ldesgoui/discord_game_sdk

sys-v1.0.1

01 Aug 20:13
Compare
Choose a tag to compare

Dependencies

  • Updated bindgen to 0.59

v1.0.1

25 Jul 13:58
Compare
Choose a tag to compare

Bug fixes

  • Fix SIGSEGV when DiscordCreate returns an error and a null pointer

v1.0.0

04 Jun 17:01
Compare
Choose a tag to compare

Breaking Changes

  • "Private" feature doc was renamed to private-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

04 Jun 16:51
Compare
Choose a tag to compare

Breaking Changes

  • "Private" feature doc was renamed to private-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

04 Jun 17:02
Compare
Choose a tag to compare
v1.0.0-rc.4 Pre-release
Pre-release

Breaking changes

  • EventHandler is now a generic parameter of Discord
  • Discord now has a lifetime parameter
  • returning iter::Collection was replaced by impl '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

04 Jun 17:02
Compare
Choose a tag to compare
v1.0.0-rc.3 Pre-release
Pre-release

Breaking Changes

  • EventHandler::on_log_message() was deleted, messages are still forwarded to the log crate
  • Removed LogLevel as it's not used anymore
  • Image::pixel(x, y) was deleted
  • set_event_handler was deleted
  • usize types appearing in API were replaced by u32 for indices or u64 for file sizes
  • OAuth2Token::scopes returns a str rather than an iterator
  • Removed derived Copy from structs (counter-intuitive copy of > 64 bits)
  • Removed From<sys::DiscordX> for X from structs (from derive_from)
  • Renamed some Error variants to shush clippy

Bugs

  • fixed illegal mutations of DiscordInner::event_handler by using UnsafeCell

Documentation

  • removed underscores in EventHandler parameters
  • updated doctests (still missing Lobbies and Networking)

Internals

  • derive_more dropped
  • image 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 over EventHandler
  • num casting is handled explicitly (panic if u32 <-> i32 fails, u32::max if buffer size is too big)
  • more explicit pointer casting

Meta

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

30 Jan 09:23
Compare
Choose a tag to compare
v1.0.0-rc.2 Pre-release
Pre-release

Fixed

  • Replaced sys struct instantiation with ::default() then mutation (provoked compilation errors on i686-pc-windows-msvc because of included padding fields)

v1.0.0-rc.1

18 Jan 00:14
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

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
  • 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

17 Jan 23:55
Compare
Choose a tag to compare
sys-v1.0.0-rc.1 Pre-release
Pre-release

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 using bindgen
    • C chars are forcefully converted to Rust u8s
    • All available builtin traits should be derived or implemented
  • 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