discordgamesdk

Documentation Latest Version License Build Status

This crate provides a safe interface to the [Discord Game SDK].

This crate is not official, it is not supported by the Discord Game SDK Developers.

The [Discord Game SDK] provides features such as, but not limited to:

Version requirement: Rust 1.37 and up.

Release Notes

Usage

Add this to your Cargo.toml:

toml [dependencies] discord_game_sdk = "1.0.0-rc.1"

Read up on potential [bindgen requirements].

Download the [Discord Game SDK] and set the following environment variable to where you extracted it:

sh export DISCORD_GAME_SDK_PATH=/path/to/discord_game_sdk

If you're also planning on using the default link feature, keep reading below.

Features:

link

Enabled by default, delegates to discord_game_sdk_sys/link.

Provides functional linking with the caveat that libraries are renamed and some additional set-up is required:

```sh

Linux: prepend with lib

cp $DISCORDGAMESDKPATH/lib/x8664/{,lib}discordgamesdk.so

Mac OS: prepend with lib and add to library search path

cp $DISCORDGAMESDKPATH/lib/x8664/{,lib}discordgamesdk.dylib export DYLDLIBRARYPATH=$DYLDLIBRARYPATH:$DISCORDGAMESDKPATH/lib/x8664

Windows: change dll.lib to lib (won't affect library searching)

cp $DISCORDGAMESDKPATH/lib/x8664/discordgamesdk.{dll.lib,lib} cp $DISCORDGAMESDKPATH/lib/x86/discordgame_sdk.{dll.lib,lib} ```

This allows for cargo run to function.

image

Optional crate.

Provides a conversion from our Image to image::RgbaImage.

Safety

This crate relies on the SDK to provide correct data and behavior:

Some of these are tested when compiled with debug_assertions.

Legal

You MUST acquaint yourself with and agree to the [official terms of the Discord Game SDK].

The code of the Rust crates discord_game_sdk and discord_game_sdk_sys are licensed at your option under either of:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Communication and Support

I can be reached via Discord twiikuu#0047, on the [Official Game SDK Server] (nicked as ldesgoui (rust wrapper)), as well as [twitter] and [email]. I reserve myself no obligation to support you, although I'm generally nice.