chorus/Cargo.toml

96 lines
2.9 KiB
TOML
Raw Permalink Normal View History

2023-04-04 16:42:20 +02:00
[package]
name = "chorus"
description = "A library for interacting with multiple Spacebar-compatible Instances at once."
2024-04-16 15:13:27 +02:00
version = "0.15.0"
license = "MPL-2.0"
2023-04-04 16:42:20 +02:00
edition = "2021"
repository = "https://github.com/polyphony-chat/chorus"
readme = "README.md"
keywords = ["spacebar", "discord", "polyphony"]
2023-08-27 12:49:58 +02:00
website = ["https://discord.com/invite/m3FpcapGDD"]
2024-08-02 21:12:38 +02:00
rust-version = "1.70.0"
2023-04-04 16:42:20 +02:00
2023-05-26 16:09:55 +02:00
[features]
default = ["client", "rt-multi-thread"]
2024-08-18 22:17:28 +02:00
backend = ["poem", "sqlx", "sqlx-pg-uint"]
rt-multi-thread = ["tokio/rt-multi-thread"]
rt = ["tokio/rt"]
client = ["flate2"]
Primitive voice implementation (feature/voice) (#457) * Add Webrtc Identify & Ready * Add more webrtc typings * Attempt an untested voice gateway implementation * fmt * Merge with main * Same allow as for voice as normal gateway * Test error observer * Minor updates * More derives * Even more derives * Small types update * e * Minor doc fixes * Modernise voice gateway * Add default impl for voicegatewayerror * Make voice event fields pub * Event updates via the scientific method * ?? * Fix bad request in voice gateway init * Voice gateway updates * Fix error failing to 'deserialize' properly * Update voice identify * Clarify FIXME related to #430 * Update to v7 * Create seperate voice_gateway.rs and voice_udp.rs * Restructure voice to new module * fix: deserialization error in speaking bitflags * feat: kinda janky ip discovery impl * feat: return ip discovery data + minor update * feat: packet parsing! * fix: voice works again * feat: add voice_media_sink_wants (comitting uncommited changes to merge) * chore: rename events/webrtc to events/voice_gateway * Add UdpHandle * chore: clippy + other misc updates * fix: attempt to fix failing wasm build * chore: yes clippy, that is indeed an unneeded return statement * feat: add VoiceData struct * feat: add VoiceData reference to UdpHandler * feat: decryption? * chore: formatting * feat: add ssrc definition (op 12) * feat: add untested sending & asbtract nonce generation * feat: Public api! (sorta) * small updates * feat: add sequence number * chore: yes * feat: merge VoiceHandler into official development * chore: yes clippy, you are special * fix: duplicated gateway events * feat: first try at vgw wasm compat * fix: blunder * fix: gateway connect using wrong url * fix: properly using encrypted data, bad practice for buffer creation * chore: split voice udp * feat: udp error handling, create udp/backends * fix: its the same * chore: clarify UDP on WASM * api: split voice gateway and udp features, test for voice gateway in WASM * feat: new encryption modes, minor code quality * docs: document voice encryption modes * chore: unused imports * chore: update getrandom version to match wasm version * chore: update on packet size FIXME * drop buf asap * Okay can't do that actually * tests: add nonce test * normal tests work? * docs: fix doc warning, fix incorrect refrences to 'webrtc' * chore: json isn't a doc test * tests: better gateway auth test * testing tests * update voice heartbeat, fix the new test issue * committed too much * fix: unused import * fix: use ip discovery address as string, not as Vec<u8> * chore: less obnoxious logging * chore: better unimplemented voice modes handling * chore: remove unused variable * chore: use matches macro * add voice examples, make gateway ones clearer * rename voice example * chore: remove unused VoiceHandler * fix: implement gateway Reconnect and InvalidSession * Typo Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com> * Fix a bunch of typos Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com> * fix: error handling while loading native certs * fix: guh * use be for nonce bytes * fix: refactor gw and vgw closures * remove outdated docs --------- Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
2024-04-16 17:18:21 +02:00
voice = ["voice_udp", "voice_gateway"]
voice_udp = ["dep:discortp", "dep:crypto_secretbox"]
voice_gateway = []
2024-08-18 22:17:28 +02:00
sqlx-pg-uint = ["dep:sqlx-pg-uint", "sqlx-pg-uint/serde"]
2023-05-26 16:09:55 +02:00
2023-04-04 16:42:20 +02:00
[dependencies]
tokio = { version = "1.38.1", features = ["macros", "sync"] }
2024-08-18 22:17:28 +02:00
serde = { version = "1.0.208", features = ["derive", "rc"] }
serde_json = { version = "1.0.120", features = ["raw_value"] }
serde-aux = "4.5.0"
serde_with = "3.9.0"
serde_repr = "0.1.19"
reqwest = { features = [
"multipart",
"json",
"rustls-tls-webpki-roots",
], version = "=0.11.26", default-features = false }
url = "2.5.2"
chrono = { version = "0.4.38", features = ["serde"] }
regex = "1.10.5"
2023-04-25 17:21:27 +02:00
custom_error = "1.9.2"
2024-01-11 19:36:36 +01:00
futures-util = "0.3.30"
http = "0.2.12"
2024-01-11 19:36:36 +01:00
base64 = "0.21.7"
bitflags = { version = "2.6.0", features = ["serde"] }
lazy_static = "1.5.0"
poem = { version = "3.0.1", features = ["multipart"], optional = true }
thiserror = "1.0.63"
jsonwebtoken = "8.3.0"
log = "0.4.22"
async-trait = "0.1.81"
chorus-macros = { path = "./chorus-macros", version = "0" } # Note: version here is used when releasing. This will use the latest release. Make sure to republish the crate when code in macros is changed!
sqlx = { version = "0.8.0", features = [
"json",
"chrono",
"ipnetwork",
"runtime-tokio-rustls",
2024-08-12 17:15:31 +02:00
"postgres",
2024-08-14 18:25:09 +02:00
"bigdecimal",
], optional = true }
discortp = { version = "0.5.0", optional = true, features = [
"rtp",
"discord",
"demux",
] }
Primitive voice implementation (feature/voice) (#457) * Add Webrtc Identify & Ready * Add more webrtc typings * Attempt an untested voice gateway implementation * fmt * Merge with main * Same allow as for voice as normal gateway * Test error observer * Minor updates * More derives * Even more derives * Small types update * e * Minor doc fixes * Modernise voice gateway * Add default impl for voicegatewayerror * Make voice event fields pub * Event updates via the scientific method * ?? * Fix bad request in voice gateway init * Voice gateway updates * Fix error failing to 'deserialize' properly * Update voice identify * Clarify FIXME related to #430 * Update to v7 * Create seperate voice_gateway.rs and voice_udp.rs * Restructure voice to new module * fix: deserialization error in speaking bitflags * feat: kinda janky ip discovery impl * feat: return ip discovery data + minor update * feat: packet parsing! * fix: voice works again * feat: add voice_media_sink_wants (comitting uncommited changes to merge) * chore: rename events/webrtc to events/voice_gateway * Add UdpHandle * chore: clippy + other misc updates * fix: attempt to fix failing wasm build * chore: yes clippy, that is indeed an unneeded return statement * feat: add VoiceData struct * feat: add VoiceData reference to UdpHandler * feat: decryption? * chore: formatting * feat: add ssrc definition (op 12) * feat: add untested sending & asbtract nonce generation * feat: Public api! (sorta) * small updates * feat: add sequence number * chore: yes * feat: merge VoiceHandler into official development * chore: yes clippy, you are special * fix: duplicated gateway events * feat: first try at vgw wasm compat * fix: blunder * fix: gateway connect using wrong url * fix: properly using encrypted data, bad practice for buffer creation * chore: split voice udp * feat: udp error handling, create udp/backends * fix: its the same * chore: clarify UDP on WASM * api: split voice gateway and udp features, test for voice gateway in WASM * feat: new encryption modes, minor code quality * docs: document voice encryption modes * chore: unused imports * chore: update getrandom version to match wasm version * chore: update on packet size FIXME * drop buf asap * Okay can't do that actually * tests: add nonce test * normal tests work? * docs: fix doc warning, fix incorrect refrences to 'webrtc' * chore: json isn't a doc test * tests: better gateway auth test * testing tests * update voice heartbeat, fix the new test issue * committed too much * fix: unused import * fix: use ip discovery address as string, not as Vec<u8> * chore: less obnoxious logging * chore: better unimplemented voice modes handling * chore: remove unused variable * chore: use matches macro * add voice examples, make gateway ones clearer * rename voice example * chore: remove unused VoiceHandler * fix: implement gateway Reconnect and InvalidSession * Typo Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com> * Fix a bunch of typos Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com> * fix: error handling while loading native certs * fix: guh * use be for nonce bytes * fix: refactor gw and vgw closures * remove outdated docs --------- Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
2024-04-16 17:18:21 +02:00
crypto_secretbox = { version = "0.1.1", optional = true }
2023-11-13 15:38:20 +01:00
rand = "0.8.5"
flate2 = { version = "1.0.30", optional = true }
webpki-roots = "0.26.3"
pubserve = { version = "1.1.0", features = ["async", "send"] }
2024-08-19 19:44:37 +02:00
sqlx-pg-uint = { git = "https://github.com/bitfl0wer/sqlx-pg-uint", features = [
"serde",
], optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rustls = "0.21.12"
tokio-tungstenite = { version = "0.20.1", features = [
"rustls-tls-webpki-roots",
] }
hostname = "0.3.1"
getrandom = { version = "0.2.15" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.15", features = ["js"] }
ws_stream_wasm = "0.7.4"
2024-08-21 19:15:11 +02:00
wasm-bindgen-futures = "0.4.43"
2024-01-19 14:55:23 +01:00
wasmtimer = "0.2.0"
[dev-dependencies]
lazy_static = "1.5.0"
2024-08-21 19:15:11 +02:00
wasm-bindgen-test = "0.3.43"
wasm-bindgen = "0.2.93"
simple_logger = { version = "5.0.0", default-features = false }
[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(tarpaulin_include)'] }