Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move xDS and protobuf definitions into separate crates. #963

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 47 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ authors = [
"Ifeanyi Ubah <ifeanyi.ubah@embark-studios.com>",
"Erin Power <erin.power@embark-studios.com>",
]
license = "Apache-2.0"
license.workspace = true
description = "Quilkin is a non-transparent UDP proxy specifically designed for use with large scale multiplayer dedicated game server deployments, to ensure security, access control, telemetry data, metrics and more."
homepage = "https://github.com/googleforgames/quilkin"
repository = "https://github.com/googleforgames/quilkin"
Expand All @@ -35,7 +35,7 @@ keywords = [
"multiplayer",
]
categories = ["game-development", "network-programming"]
edition = "2021"
edition.workspace = true
exclude = ["docs", "build", "examples", "image"]

[[bench]]
Expand Down Expand Up @@ -66,22 +66,24 @@ test = false
[dependencies]
# Local
quilkin-macros = { version = "0.9.0-dev", path = "./crates/macros" }
xds = { path = "crates/xds" }
quilkin-proto = { path = "crates/quilkin-proto" }

# Crates.io
arc-swap = { version = "1.6.0", features = ["serde"] }
arc-swap.workspace = true
async-channel.workspace = true
async-stream = "0.3.5"
async-stream.workspace = true
base64.workspace = true
base64-serde = "0.7.0"
bytes = { version = "1.5.0", features = ["serde"] }
cached = { version = "0.49", default-features = false }
cached.workspace = true
time = { version = "0.3", default-features = false, features = ["std"] }
clap = { version = "4.4.6", features = ["cargo", "derive", "env"] }
dashmap = { version = "5.5.3", features = ["serde"] }
either = "1.9.0"
enum-map = "2.6.3"
eyre = "0.6.8"
fixedstr = { version = "0.5", features = ["flex-str"] }
enum-map.workspace = true
eyre.workspace = true
fixedstr.workspace = true
futures.workspace = true
hyper = { version = "0.14.27", features = ["http2"] }
hyper-rustls = { version = "0.24.1", features = ["http2", "webpki-roots"] }
Expand All @@ -92,32 +94,32 @@ maxminddb = "0.24.0"
notify = "6.1.1"
num_cpus = "1.16.0"
once_cell = "1.18.0"
parking_lot = "0.12.1"
prometheus = { version = "0.13.3", default-features = false }
prost = "0.12.1"
prost-types = "0.12.1"
parking_lot.workspace = true
prometheus.workspace = true
prost.workspace = true
prost-types.workspace = true
rand.workspace = true
regex = "1.9.6"
schemars = { version = "0.8.15", features = ["bytes", "url"] }
schemars.workspace = true
seahash = "4.1"
serde = { version = "1.0.188", features = ["derive", "rc"] }
serde.workspace = true
serde_json.workspace = true
serde_regex = "1.1.0"
serde_stacker = "0.1.10"
serde_yaml = "0.9.25"
snap = "1.1.0"
socket2.workspace = true
stable-eyre = "0.2.2"
thiserror = "1.0.49"
thiserror.workspace = true
tokio.workspace = true
tokio-stream = { version = "0.1.14", features = ["net", "sync"] }
tonic = "0.10.2"
tokio-stream.workspace = true
tonic.workspace = true
tracing.workspace = true
tracing-futures = { version = "0.2.5", features = ["futures-03"] }
tracing-futures.workspace = true
tracing-subscriber = { workspace = true, features = ["json", "env-filter"] }
tryhard = "0.5.1"
tryhard.workspace = true
url = { version = "2.4.1", features = ["serde"] }
uuid = { version = "1.4.1", default-features = false, features = ["v4"] }
uuid.workspace = true
lasso = { version = "0.7.2", features = ["multi-threaded"] }
kube.workspace = true
kube-core.workspace = true
Expand Down Expand Up @@ -167,9 +169,20 @@ debug = true
[workspace]
members = [".", "crates/*"]


[workspace.package]
license = "Apache-2.0"
edition = "2021"

[workspace.dependencies]
arc-swap = { version = "1.6.0", features = ["serde"] }
async-channel = "2.1.0"
async-stream = "0.3.5"
base64 = "0.21.0"
cached = { version = "0.49", default-features = false }
eyre = "0.6.8"
enum-map = "2.6.3"
futures = "0.3.28"
kube = { version = "0.91", features = [
"runtime",
"rustls-tls",
Expand All @@ -179,12 +192,18 @@ kube-core = { version = "0.91", default-features = false, features = [
"schema",
] }
k8s-openapi = { version = "0.22", features = ["v1_29", "schemars"] }
futures = "0.3.28"
once_cell = "1.18.0"
prometheus = { version = "0.13.3", default-features = false }
prost = "0.12.1"
prost-types = "0.12.1"
quilkin = { path = "." }
rand = "0.8.5"
serde = { version = "1.0.188", features = ["derive", "rc"] }
serde_json = "1.0.107"
socket2 = { version = "0.5.4", features = ["all"] }
tempfile = "3.8.0"
thiserror = "1.0.49"
tokio-stream = { version = "0.1.14", features = ["net", "sync"] }
tokio = { version = "1.32.0", features = [
"rt-multi-thread",
"fs",
Expand All @@ -193,6 +212,12 @@ tokio = { version = "1.32.0", features = [
"parking_lot",
"tracing",
] }
tempfile = "3.8.0"
tonic = "0.10.2"
tracing = "0.1.37"
tracing-futures = { version = "0.2.5", features = ["futures-03"] }
tracing-subscriber = "0.3"
tryhard = "0.5.1"
uuid = { version = "1.4.1", default-features = false, features = ["v4"] }
fixedstr = { version = "0.5", features = ["flex-str"] }
parking_lot = "0.12.1"
schemars = { version = "0.8.15", features = ["bytes", "url"] }
2 changes: 1 addition & 1 deletion crates/proto-gen/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fn execute(which: &str) {
.arg("--generate-transport")
.args(["--disable-comments", "."])
.arg(which)
.args(["-o", "src/generated"]);
.args(["-o", "crates/quilkin-proto/src/generated"]);

for (dir, files) in files {
cmd.arg("-d");
Expand Down
12 changes: 12 additions & 0 deletions crates/quilkin-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "quilkin-proto"
version = "0.1.0"
edition.workspace = true
license.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
prost.workspace = true
prost-types.workspace = true
tonic.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions crates/quilkin-proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![allow(
clippy::doc_markdown,
clippy::use_self,
clippy::enum_variant_names,
clippy::large_enum_variant,
clippy::len_without_is_empty,
rustdoc::bare_urls
)]
pub mod generated;
pub use generated::*;
35 changes: 35 additions & 0 deletions crates/xds/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
name = "xds"
version = "0.1.0"
edition.workspace = true
license.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
quilkin-proto = { path = "../quilkin-proto" }

arc-swap.workspace = true
async-stream.workspace = true
cached.workspace = true
enum-map.workspace = true
eyre.workspace = true
futures.workspace = true
once_cell.workspace = true
prometheus.workspace = true
rand.workspace = true
prost.workspace = true
prost-types.workspace = true
serde.workspace = true
serde_json.workspace = true
schemars.workspace = true
fixedstr.workspace = true
parking_lot.workspace = true
thiserror.workspace = true
tokio-stream.workspace = true
tokio.workspace = true
tonic.workspace = true
tracing-futures.workspace = true
tracing.workspace = true
tryhard.workspace = true
uuid.workspace = true
Loading