generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from EmbarkStudios/impl
This adds the base groundwork for replicating the official SDK as well as (mostly) complete implementations of the [Activities](https://discord.com/developers/docs/game-sdk/activities), [Lobbies](https://discord.com/developers/docs/game-sdk/lobbies), and [Overlay](https://discord.com/developers/docs/game-sdk/overlay) portions of the SDK. The current implementation is largely hands off, meaning that it is up to the user to manage the actual state, unlike the official SDK. For example, if you create a lobby, and wanted to present the state of the lobby in a UI (the users in the lobby, whether those users are speaking, what messages had been sent to the lobby, and any metadata associated with the lobby or the users) you would need to keep the state of the lobby updated with all of the various events (member connected/disconnected/updated, member start/stop speaking, lobby updated) to accurately represent the complete lobby state as Discord would see it. One other thing, we are using a fork of tokio as named pipe support on Windows is extremely new, and was missing a few small methods that we need to be able to use the same exact I/O loop code on both Unix and Windows without having to have a separate special path just for Windows.
- Loading branch information
Showing
38 changed files
with
5,386 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/target | ||
sniff/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
|
||
.idea | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[package] | ||
name = "discord-sdk" | ||
version = "0.0.1" | ||
authors = ["Embark <[email protected]>", "Jake Shadle <[email protected]>"] | ||
edition = "2018" | ||
description = "An open implementation of the Discord Game SDK" | ||
license = "MIT OR Apache-2.0" | ||
documentation = "https://docs.rs/discord-sdk" | ||
homepage = "https://github.com/EmbarkStudios/discord-sdk" | ||
repository = "https://github.com/EmbarkStudios/discord-sdk" | ||
keywords = ["discord", "games"] | ||
readme = "README.md" | ||
|
||
exclude = [ | ||
"sniff", | ||
"run-sniff.sh", | ||
] | ||
|
||
[features] | ||
# Enables tests that require 2 running Discord applications (stable, canary, or PTB) | ||
# with a logged in user, see https://discord.com/developers/docs/game-sdk/sdk-starter-guide#testing-locally-with-two-clients | ||
local-testing = [] | ||
|
||
[dependencies] | ||
anyhow = "1.0" | ||
app_dirs2 = "2.3" | ||
async-trait = "0.1" | ||
base64 = "0.13" | ||
bitflags = "1.2" | ||
chrono = "0.4" | ||
crossbeam-channel = "0.5" | ||
num-traits = "0.2" | ||
parking_lot = "0.11" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
serde_repr = "0.1" | ||
thiserror = "1.0" | ||
tokio = { version = "1.7", features = ["net", "rt-multi-thread", "sync", "time"] } | ||
tracing = "0.1" | ||
url = "2.2" | ||
|
||
[target.'cfg(target_os = "windows")'.dependencies] | ||
winreg = "0.9" | ||
|
||
[dev-dependencies] | ||
tokio = { version = "1.7", features = ["macros"] } | ||
tracing-subscriber = "0.2" | ||
|
||
[patch.crates-io] | ||
# Support for Windows named pipes. They were removed in tokio 1.0 and added | ||
# back in 1.7, however, the support was basic and made them too different from | ||
# the unix streams, so we use our fork to add ready and try_read/write. | ||
# branch = named-pipes-1.7 | ||
tokio = { git = "https://github.com/EmbarkStudios/tokio", rev = "205f7e9a" } |
Oops, something went wrong.