dgs
discord_game_sdk_sys
cargo install discord_game_sdk_sys
dgs

discord_game_sdk_sys

Rust bindings for the Discord Game SDK

by Lucas Desgouilles

1.0.0 (see all)License:Apache-2.0 OR MIT
cargo install discord_game_sdk_sys
Readme

discord_game_sdk_sys

Documentation Latest Version License

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.

Usage

Add this to your Cargo.toml:

[dependencies]
discord_game_sdk_sys = "1.0.0"

Read up on potential bindgen requirements.

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

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:

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:

# Linux: prepend with `lib` and add to library search path
cp $DISCORD_GAME_SDK_PATH/lib/x86_64/{,lib}discord_game_sdk.so
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}$DISCORD_GAME_SDK_PATH/lib/x86_64

# Mac OS: prepend with `lib` and add to library search path
cp $DISCORD_GAME_SDK_PATH/lib/x86_64/{,lib}discord_game_sdk.dylib
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}$DISCORD_GAME_SDK_PATH/lib/x86_64

# Windows: change `dll.lib` to `lib` (won't affect library search)
cp $DISCORD_GAME_SDK_PATH/lib/x86_64/discord_game_sdk.{dll.lib,lib}
cp $DISCORD_GAME_SDK_PATH/lib/x86/discord_game_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.

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.

GitHub Stars

44

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

3

OPEN PRs

0
VersionTagPublished
1.0.0
2yrs ago
1.0.0-rc.1
2yrs ago
0.5.0-alpha.2
2yrs ago
0.5.0-alpha.1
3yrs ago
No alternatives found
No tutorials found
Add a tutorial