• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An open implementation of the Discord Game SDK in Rust

โš”๏ธ discord-sdk

An (unofficial) open source Rust implementation of the Discord Game SDK.

Embark Embark Crates.io Docs dependency status Build status

Why not use this?

  • This project is not official and is using a largely undocumented protocol that Discord could change/break at any time in the future.
  • There is already a Rust wrapper for the official Game SDK.
  • Your project is not also in Rust. We may add a C API for this crate in the future, but for now this is a Rust only project.

Why use this?

  • You use Rust for your project and want to integrate features such as rich presence/activities provided by Discord.
  • You don't want to have a dependency on a closed source, shared library.
  • You like to live dangerously (though this library does also have some automated tests!).

Implemented Features

TODO: Achievements

Activities (Rich Presence)

Commands

Events

Other

TODO: Applications

โš ๏ธ Voice

Commands

Events

  • VOICE_SETTINGS_UPDATE_2 - Undocumented, but this event is fired for all voice settings changes, except for "Set Local Volume".

TODO: Images

โš ๏ธ Lobbies

Commands

Events

Other

โš ๏ธ Networking

Overlay

NOTE: These are only tested insofar as the protocol is (probably) correct, however, the overlay is currently extremely limited, and so we were unable to test that the overlay commands actually function correctly since our primary project is Vulkan.

Note, there are a few other cases that overlay will not work with. The overlay is currently not supported for Mac, games with Vulkan support, and generally old games.

Also note, the SDK itself and its documentation uses the utterly confusing terminology of Un/Locked when talking about the overlay, this crate instead uses Visibility, as in Visible or Hidden.

Commands

Events

Relationships

Commands

  • Get Relationships - NOTE: This command is not really exposed directly from the regular Game SDK, but is implicitly executed by the SDK during intialization.

Events

TODO: Storage

TODO?: Store

Users

Commands

Events

โš ๏ธ Deprecation

This hasn't been officially announced by Discord yet, but the Voice, Lobbies, and Networking functionality will be deprecated and removed sometime in the future. Since only the lobbies functionality has been implemented thus far, we will mark that functionality as deprecated once it is official.

Testing

Unfortunately Discord does not provide a convenient way to perform automated testing, as it requires an actual working Discord application to be running and logged in, which makes automated (particularly headless) testing...annoying.

For now, it's required that you manually spin up 2 different Discord applications (eg, Stable and Canary) and log in with separate accounts on the same machine, then run one test at a time.

Activities

cargo test --features local-testing test_activity

Lobbies

NOTE: This does not test the lobby search functionality as that command seems to be non-functioning and never returns results, even if the REST equivalent does return the expected results.

cargo test --features local-testing test_lobbies

Contribution

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.

Any contribution intentionally submitted for inclusion in an Embark Studios project, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to Embark or any other licensee/user of the contribution.

More Repositories

1

rust-gpu

๐Ÿ‰ Making Rust a first-class language and ecosystem for GPU shaders ๐Ÿšง
Rust
6,796
star
2

kajiya

๐Ÿ’ก Experimental real-time global illumination renderer ๐Ÿฆ€
Rust
4,753
star
3

wg-ui

WireGuard Web UI for self-serve client configurations, with optional auth.
Go
1,468
star
4

cargo-deny

โŒ Cargo plugin for linting your dependencies ๐Ÿฆ€
Rust
1,254
star
5

puffin

๐Ÿฆ Friendly little instrumentation profiler for Rust ๐Ÿฆ€
Rust
973
star
6

rust-ecosystem

Rust wants & tracking for Embark ๐Ÿฆ€
Rust
843
star
7

physx-rs

๐ŸŽณ Rust binding for NVIDIA PhysX ๐Ÿฆ€
Rust
646
star
8

blender-tools

๐Ÿต Embark Addon for Blender
Python
411
star
9

cargo-about

๐Ÿ“œ Cargo plugin to generate list of all licenses for a crate ๐Ÿฆ€
Rust
320
star
10

tryhard

๐Ÿ’ซ Easily retry futures ๐Ÿฆ€
Rust
200
star
11

presser

A crate to help you copy things into raw buffers without invoking spooky action at a distance (undefined behavior).
Rust
157
star
12

crash-handling

Collection of crates to deal with crashes
Rust
135
star
13

poll-promise

A Rust promise for games and immediate mode GUIs
Rust
127
star
14

rpmalloc-rs

๐Ÿ rpmalloc global memory allocator for Rust ๐Ÿฆ€
Rust
126
star
15

skyhook

Simple Python communication system for DCC's and Game Engines
Python
104
star
16

spirt

SPIR-๐Ÿ‡น: shader-focused IR to target, transform and translate from ๐Ÿฆ€
Rust
103
star
17

superluminal-perf-rs

๐Ÿ”† Superluminal Performance profiler Rust API ๐Ÿฆ€
Rust
94
star
18

ash-molten

๐ŸŒ‹ Statically linked MoltenVK for Vulkan on Mac using Ash ๐Ÿฆ€
Rust
91
star
19

cargo-deny-action

โŒ GitHub Action for cargo-deny ๐Ÿฆ€
Shell
89
star
20

cargo-fetcher

๐ŸŽ cargo plugin for quickly fetching dependencies ๐Ÿฆ€
Rust
83
star
21

mirror-mirror

๐Ÿชž Powerful reflection library for Rust
Rust
79
star
22

relnotes

Automatic GitHub Release Notes
Rust
77
star
23

opensource-template

๐ŸŒป Template for creating new repositories
74
star
24

tame-oauth

๐Ÿ” Small OAuth crate that follows the sans-io approach ๐Ÿฆ€
Rust
68
star
25

tiny-bench

A tiny benchmarking library
Rust
59
star
26

k8s-buildkite-plugin

Run any buildkite build step as a Kubernetes Job
Jsonnet
49
star
27

krates

๐Ÿ“ฆ Creates graphs of crates from cargo metadata ๐Ÿฆ€
Rust
45
star
28

opensource

Open source processes, policies, and info
Rust
42
star
29

cervo

Utility wrappers for tract
Rust
40
star
30

tracing-logfmt

A logfmt formatter for tracing subscriber logs
Rust
38
star
31

tame-gcs

๐Ÿ“‚ A small library with a limited set of Google Cloud Storage operations ๐Ÿฆ€
Rust
37
star
32

octobors

Rust program for automerging PRs based on a few rules
Rust
35
star
33

server-framework

Framework for running network services, opinions included
Rust
35
star
34

nfd2

OS native dialogs for Windows, MacOS, and Linux
Rust
32
star
35

cfg-expr

A parser and evaluator for Rust cfg() expressions. Targets as of Rust 1.58.0 are supported.
Rust
32
star
36

pdm-plugin-torch

A tool for managing torch-variants with PDM.
Python
31
star
37

opa-policies

Contains OPA Policies for Dockerfiles, Kubernetes YAMLs, Terraform, etc
Open Policy Agent
29
star
38

gsutil

Minimal gsutil replacement
Rust
27
star
39

spdx

๐Ÿ†” Helper crate for SPDX expressions. ๐Ÿฆ€
Rust
27
star
40

tame-index

Small crate for interacting with cargo registry indices
Rust
23
star
41

fsr-rs

Rust bindings for AMD FidelityFXโ„ข Super Resolution
C
22
star
42

opensource-website

๐ŸŒ Hub for Embark's open source efforts
HTML
22
star
43

buildkite-jobify

๐Ÿ‘ท Kubekite, but in Rust, using configuration from your repos ๐Ÿฆ€
Rust
21
star
44

spirv-tools-rs

๐Ÿ›  Wrapper crate for SPIRV-Tools ๐Ÿฆ€
C++
20
star
45

emote

Reinforcement learning library from Embark Studios
Python
19
star
46

proto-gen

A protobuf generation runner/cli using tonic build
Rust
18
star
47

rymder

Unofficial agones client SDK
Rust
17
star
48

sentry-contrib-rust

Integrates crashdump reporting with Sentry
Rust
15
star
49

tame-oidc

๐Ÿงฌ Small OAuth crate that follows the sans-io approach ๐Ÿฆ€
Rust
11
star
50

tame-webpurify

๐Ÿ’ฉ Small HTTP client for the Webpurify API following the sans-io approach ๐Ÿฆ€
Rust
9
star
51

cloud-dns

A wrapper for the Google Cloud DNS API (https://cloud.google.com/dns)
Rust
7
star
52

boh

Rust
5
star
53

tracing-ext-ffi-subscriber

Simple subscriber for forwarding tracing spans to a C or C++ profiling API.
Rust
4
star
54

server-code-exciser

A program that contains grammars and functionality to remove server only code from code bases.
C#
4
star
55

gke-accelerated-xorg-example

Example project for running remote rendering on GKE
Dockerfile
3
star
56

helix-oidc

๐Ÿงฌ Helix Perforce OIDC validator
Go
3
star
57

cassini

Topology-aware distributed cache
Go
2
star
58

minwin

Rust
2
star
59

container-packer-qemu

๐Ÿ“ฆ Dockerized packer with qemu
Dockerfile
1
star
60

rustc-compile-time-regress

Rust
1
star
61

missing-symbols

Rust
1
star
62

.github

Default community health files for GitHub (https://help.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file-for-your-organization)
1
star
63

toml-span

Span preserving toml deserializer
Rust
1
star