This crate provides bindgen
-generated bindings to the [Discord Game SDK].
This crate is not official, it is not supported by the Discord Game SDK Developers.
Following the -sys
package conventions, this crate does not define higher-level abstractions.
Add this to your Cargo.toml
:
toml
[dependencies]
discord_game_sdk_sys = "1.0.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.
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
lib
and add to library search pathcp $DISCORDGAMESDKPATH/lib/x8664/{,lib}discordgamesdk.so export LDLIBRARYPATH=${LDLIBRARYPATH:+${LDLIBRARYPATH}:}$DISCORDGAMESDKPATH/lib/x8664
lib
and add to library search pathcp $DISCORDGAMESDKPATH/lib/x8664/{,lib}discordgamesdk.dylib export DYLDLIBRARYPATH=${DYLDLIBRARYPATH:+${DYLDLIBRARYPATH}:}$DISCORDGAMESDKPATH/lib/x8664
dll.lib
to lib
(won't affect library search)cp $DISCORDGAMESDKPATH/lib/x8664/discordgamesdk.{dll.lib,lib} cp $DISCORDGAMESDKPATH/lib/x86/discordgame_sdk.{dll.lib,lib} ```
This allows for cargo run
to function.
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.