"//cache",
"//gateway",
"//novactl",
- "//ratelimiter",
+ "//rest",
"//webhook",
],
)
images = {
"ghcr.io/discordnova/nova/novactl:$(docker_tag)": "//novactl:image",
"ghcr.io/discordnova/nova/gateway:$(docker_tag)": "//gateway:image",
- "ghcr.io/discordnova/nova/ratelimiter:$(docker_tag)": "//ratelimiter:image",
+ "ghcr.io/discordnova/nova/rest:$(docker_tag)": "//rest:image",
"ghcr.io/discordnova/nova/webhook:$(docker_tag)": "//webhook:image",
"ghcr.io/discordnova/nova/cache:$(docker_tag)": "//cache:image",
},
tests = [
"//gateway:tests",
"//novactl:tests",
- "//ratelimiter:tests",
+ "//rest:tests",
"//webhook:tests",
],
)
"memchr",
]
-[[package]]
-name = "anyhow"
-version = "1.0.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf"
-
[[package]]
name = "arrayvec"
version = "0.5.2"
"futures-core",
]
-[[package]]
-name = "async-stream"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625"
-dependencies = [
- "async-stream-impl",
- "futures-core",
-]
-
-[[package]]
-name = "async-stream-impl"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "async-task"
version = "4.0.3"
"pretty_env_logger",
"prometheus",
"serde 1.0.130",
+ "testcontainers",
"tokio",
]
"lazy_static",
]
+[[package]]
+name = "crypto-mac"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a"
+dependencies = [
+ "generic-array",
+ "subtle",
+]
+
[[package]]
name = "curve25519-dalek"
version = "3.2.0"
"zeroize",
]
-[[package]]
-name = "either"
-version = "1.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
-
[[package]]
name = "enumflags2"
version = "0.7.1"
"instant",
]
-[[package]]
-name = "fixedbitset"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
-
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
[[package]]
name = "form_urlencoded"
version = "1.0.1"
"enumflags2",
"futures",
"futures-util",
- "log",
"num",
"num-derive",
"num-traits 0.2.14",
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
-[[package]]
-name = "heck"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
-dependencies = [
- "unicode-segmentation",
-]
-
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+[[package]]
+name = "hmac"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15"
+dependencies = [
+ "crypto-mac",
+ "digest",
+]
+
[[package]]
name = "http"
version = "0.2.4"
]
[[package]]
-name = "hyper-timeout"
-version = "0.4.1"
+name = "hyper-tls"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
+ "bytes",
"hyper",
- "pin-project-lite",
+ "native-tls",
"tokio",
- "tokio-io-timeout",
+ "tokio-native-tls",
]
[[package]]
"cfg-if",
]
-[[package]]
-name = "itertools"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itoa"
version = "0.4.8"
]
[[package]]
-name = "multimap"
-version = "0.8.3"
+name = "native-tls"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
+checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
[[package]]
name = "nats"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+[[package]]
+name = "openssl"
+version = "0.10.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-sys",
+]
+
[[package]]
name = "openssl-probe"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
+[[package]]
+name = "openssl-sys"
+version = "0.9.67"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69df2d8dfc6ce3aaf44b40dec6f487d5a886516cf6879c49e98e0710f310a058"
+dependencies = [
+ "autocfg",
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
[[package]]
name = "parking"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
-[[package]]
-name = "petgraph"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7"
-dependencies = [
- "fixedbitset",
- "indexmap",
-]
-
[[package]]
name = "pin-project"
version = "1.0.8"
"thiserror",
]
-[[package]]
-name = "prost"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020"
-dependencies = [
- "bytes",
- "prost-derive",
-]
-
-[[package]]
-name = "prost-build"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603"
-dependencies = [
- "bytes",
- "heck",
- "itertools",
- "log",
- "multimap",
- "petgraph",
- "prost",
- "prost-types",
- "tempfile",
- "which",
-]
-
-[[package]]
-name = "prost-derive"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba"
-dependencies = [
- "anyhow",
- "itertools",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "prost-types"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b"
-dependencies = [
- "bytes",
- "prost",
-]
-
[[package]]
name = "protobuf"
version = "2.25.1"
]
[[package]]
-name = "rest-ratelimiter"
+name = "rest"
version = "0.1.0"
dependencies = [
- "prost",
+ "common",
+ "futures-util",
+ "hyper",
+ "hyper-tls",
+ "serde 1.0.130",
"tokio",
- "tonic",
- "tonic-build",
]
[[package]]
"winapi-util",
]
+[[package]]
+name = "testcontainers"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5e3ed6e3598dbf32cba8cb356b881c085e0adea57597f387723430dd94b4084"
+dependencies = [
+ "hex",
+ "hmac",
+ "log",
+ "rand 0.8.4",
+ "serde 1.0.130",
+ "serde_json",
+ "sha2",
+]
+
[[package]]
name = "thiserror"
version = "1.0.29"
"winapi",
]
-[[package]]
-name = "tokio-io-timeout"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90c49f106be240de154571dd31fbe48acb10ba6c6dd6f6517ad603abffa42de9"
-dependencies = [
- "pin-project-lite",
- "tokio",
-]
-
[[package]]
name = "tokio-macros"
version = "1.3.0"
]
[[package]]
-name = "tokio-rustls"
-version = "0.22.0"
+name = "tokio-native-tls"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
+checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
- "rustls",
+ "native-tls",
"tokio",
- "webpki",
]
[[package]]
-name = "tokio-stream"
-version = "0.1.7"
+name = "tokio-rustls"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f"
+checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
- "futures-core",
- "pin-project-lite",
+ "rustls",
"tokio",
+ "webpki",
]
[[package]]
"serde 1.0.130",
]
-[[package]]
-name = "tonic"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "796c5e1cd49905e65dd8e700d4cb1dffcbfdb4fc9d017de08c1a537afd83627c"
-dependencies = [
- "async-stream",
- "async-trait",
- "base64",
- "bytes",
- "futures-core",
- "futures-util",
- "h2",
- "http",
- "http-body",
- "hyper",
- "hyper-timeout",
- "percent-encoding",
- "pin-project",
- "prost",
- "prost-derive",
- "tokio",
- "tokio-stream",
- "tokio-util",
- "tower",
- "tower-layer",
- "tower-service",
- "tracing",
- "tracing-futures",
-]
-
-[[package]]
-name = "tonic-build"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12b52d07035516c2b74337d2ac7746075e7dcae7643816c1b12c5ff8a7484c08"
-dependencies = [
- "proc-macro2",
- "prost-build",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "tower"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f60422bc7fefa2f3ec70359b8ff1caff59d785877eb70595904605bcc412470f"
-dependencies = [
- "futures-core",
- "futures-util",
- "indexmap",
- "pin-project",
- "rand 0.8.4",
- "slab",
- "tokio",
- "tokio-stream",
- "tokio-util",
- "tower-layer",
- "tower-service",
- "tracing",
-]
-
-[[package]]
-name = "tower-layer"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62"
-
[[package]]
name = "tower-service"
version = "0.3.1"
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
dependencies = [
"cfg-if",
- "log",
"pin-project-lite",
- "tracing-attributes",
"tracing-core",
]
-[[package]]
-name = "tracing-attributes"
-version = "0.1.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "tracing-core"
version = "0.1.19"
"lazy_static",
]
-[[package]]
-name = "tracing-futures"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
-dependencies = [
- "pin-project",
- "tracing",
-]
-
[[package]]
name = "try-lock"
version = "0.2.3"
"tinyvec",
]
-[[package]]
-name = "unicode-segmentation"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
-
[[package]]
name = "unicode-xid"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
[[package]]
name = "version_check"
version = "0.9.3"
version = "0.1.0"
dependencies = [
"common",
- "config",
"hex",
"hyper",
+ "libc",
"libsodium-sys",
- "log",
- "nats",
"serde 1.0.130",
"serde_json",
"tokio",
"webpki",
]
-[[package]]
-name = "which"
-version = "4.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9"
-dependencies = [
- "either",
- "lazy_static",
- "libc",
-]
-
[[package]]
name = "winapi"
version = "0.3.9"
\r
members = [\r
"webhook",\r
- "ratelimiter",\r
"gateway",\r
"cache",\r
- "common/rust"\r
+ "common/rust",\r
+ "rest"\r
]\r
\r
[package]\r
compile_data_attr = "glob([\"*/**\"])"\r
additional_build_file = "bazel/patch/BUILD_script_patch"\r
gen_buildrs = false\r
-additional_deps = [":libsodium_sys_build_script"]
\ No newline at end of file
+additional_deps = [":libsodium_sys_build_script"]\r
+\r
+\r
+[package.metadata.raze.crates.value-bag.'*']\r
+gen_buildrs = false
\ No newline at end of file
.PHONY: gazelle
gazelle:
bazel run //:gazelle -- update-repos -build_file_name BUILD.bazel -from_file=go.mod -to_macro=deps.bzl%go_dependencies
-
-.PHONY: docs
-docs:
workspace(name = "nova")
-
-#@unused
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
# EXPERIMENTAL -- MAY CHANGE AT ANY TIME: A mapping of package names to a set of normal dependencies for the Rust targets of that package.
_DEPENDENCIES = {
"webhook": {
- "config": "@raze__config__0_11_0//:config",
"hex": "@raze__hex__0_4_3//:hex",
"hyper": "@raze__hyper__0_14_12//:hyper",
+ "libc": "@raze__libc__0_2_101//:libc",
"libsodium-sys": "@raze__libsodium_sys__0_2_7//:libsodium_sys",
- "log": "@raze__log__0_4_14//:log",
- "nats": "@raze__nats__0_15_2//:nats",
"serde": "@raze__serde__1_0_130//:serde",
"serde_json": "@raze__serde_json__1_0_67//:serde_json",
"tokio": "@raze__tokio__1_11_0//:tokio",
"pretty_env_logger": "@raze__pretty_env_logger__0_4_0//:pretty_env_logger",
"prometheus": "@raze__prometheus__0_12_0//:prometheus",
"serde": "@raze__serde__1_0_130//:serde",
+ "testcontainers": "@raze__testcontainers__0_12_0//:testcontainers",
"tokio": "@raze__tokio__1_11_0//:tokio",
},
- "ratelimiter": {
- "prost": "@raze__prost__0_8_0//:prost",
- "tokio": "@raze__tokio__1_11_0//:tokio",
- "tonic": "@raze__tonic__0_5_2//:tonic",
- },
"gateway": {
"enumflags2": "@raze__enumflags2__0_7_1//:enumflags2",
"futures": "@raze__futures__0_3_17//:futures",
"futures-util": "@raze__futures_util__0_3_17//:futures_util",
- "log": "@raze__log__0_4_14//:log",
"num": "@raze__num__0_4_0//:num",
"num-traits": "@raze__num_traits__0_2_14//:num_traits",
"serde": "@raze__serde__1_0_130//:serde",
"serde": "@raze__serde__1_0_130//:serde",
"serde_json": "@raze__serde_json__1_0_67//:serde_json",
},
+ "rest": {
+ "futures-util": "@raze__futures_util__0_3_17//:futures_util",
+ "hyper": "@raze__hyper__0_14_12//:hyper",
+ "hyper-tls": "@raze__hyper_tls__0_5_0//:hyper_tls",
+ "serde": "@raze__serde__1_0_130//:serde",
+ "tokio": "@raze__tokio__1_11_0//:tokio",
+ },
"": {
"libc": "@raze__libc__0_2_101//:libc",
},
},
"common/rust": {
},
- "ratelimiter": {
- },
"gateway": {
"num-derive": "@raze__num_derive__0_3_3//:num_derive",
"serde_repr": "@raze__serde_repr__0_1_7//:serde_repr",
},
"cache": {
},
+ "rest": {
+ },
"": {
},
}
},
"common/rust": {
},
- "ratelimiter": {
- "tonic-build": "@raze__tonic_build__0_5_2//:tonic_build",
- },
"gateway": {
},
"cache": {
},
+ "rest": {
+ },
"": {
},
}
},
"common/rust": {
},
- "ratelimiter": {
- },
"gateway": {
},
"cache": {
},
+ "rest": {
+ },
"": {
},
}
build_file = Label("//cargo/remote:BUILD.aho-corasick-0.7.18.bazel"),
)
- maybe(
- http_archive,
- name = "raze__anyhow__1_0_43",
- url = "https://crates.io/api/v1/crates/anyhow/1.0.43/download",
- type = "tar.gz",
- sha256 = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf",
- strip_prefix = "anyhow-1.0.43",
- build_file = Label("//cargo/remote:BUILD.anyhow-1.0.43.bazel"),
- )
-
maybe(
http_archive,
name = "raze__arrayvec__0_5_2",
build_file = Label("//cargo/remote:BUILD.async-channel-1.6.1.bazel"),
)
- maybe(
- http_archive,
- name = "raze__async_stream__0_3_2",
- url = "https://crates.io/api/v1/crates/async-stream/0.3.2/download",
- type = "tar.gz",
- sha256 = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625",
- strip_prefix = "async-stream-0.3.2",
- build_file = Label("//cargo/remote:BUILD.async-stream-0.3.2.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__async_stream_impl__0_3_2",
- url = "https://crates.io/api/v1/crates/async-stream-impl/0.3.2/download",
- type = "tar.gz",
- sha256 = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308",
- strip_prefix = "async-stream-impl-0.3.2",
- build_file = Label("//cargo/remote:BUILD.async-stream-impl-0.3.2.bazel"),
- )
-
maybe(
http_archive,
name = "raze__async_task__4_0_3",
build_file = Label("//cargo/remote:BUILD.crossbeam-utils-0.8.5.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__crypto_mac__0_10_1",
+ url = "https://crates.io/api/v1/crates/crypto-mac/0.10.1/download",
+ type = "tar.gz",
+ sha256 = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a",
+ strip_prefix = "crypto-mac-0.10.1",
+ build_file = Label("//cargo/remote:BUILD.crypto-mac-0.10.1.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__curve25519_dalek__3_2_0",
build_file = Label("//cargo/remote:BUILD.ed25519-dalek-1.0.1.bazel"),
)
- maybe(
- http_archive,
- name = "raze__either__1_6_1",
- url = "https://crates.io/api/v1/crates/either/1.6.1/download",
- type = "tar.gz",
- sha256 = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457",
- strip_prefix = "either-1.6.1",
- build_file = Label("//cargo/remote:BUILD.either-1.6.1.bazel"),
- )
-
maybe(
http_archive,
name = "raze__enumflags2__0_7_1",
build_file = Label("//cargo/remote:BUILD.fastrand-1.5.0.bazel"),
)
- maybe(
- http_archive,
- name = "raze__fixedbitset__0_2_0",
- url = "https://crates.io/api/v1/crates/fixedbitset/0.2.0/download",
- type = "tar.gz",
- sha256 = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d",
- strip_prefix = "fixedbitset-0.2.0",
- build_file = Label("//cargo/remote:BUILD.fixedbitset-0.2.0.bazel"),
- )
-
maybe(
http_archive,
name = "raze__fnv__1_0_7",
build_file = Label("//cargo/remote:BUILD.fnv-1.0.7.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__foreign_types__0_3_2",
+ url = "https://crates.io/api/v1/crates/foreign-types/0.3.2/download",
+ type = "tar.gz",
+ sha256 = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1",
+ strip_prefix = "foreign-types-0.3.2",
+ build_file = Label("//cargo/remote:BUILD.foreign-types-0.3.2.bazel"),
+ )
+
+ maybe(
+ http_archive,
+ name = "raze__foreign_types_shared__0_1_1",
+ url = "https://crates.io/api/v1/crates/foreign-types-shared/0.1.1/download",
+ type = "tar.gz",
+ sha256 = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b",
+ strip_prefix = "foreign-types-shared-0.1.1",
+ build_file = Label("//cargo/remote:BUILD.foreign-types-shared-0.1.1.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__form_urlencoded__1_0_1",
build_file = Label("//cargo/remote:BUILD.hashbrown-0.11.2.bazel"),
)
- maybe(
- http_archive,
- name = "raze__heck__0_3_3",
- url = "https://crates.io/api/v1/crates/heck/0.3.3/download",
- type = "tar.gz",
- sha256 = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c",
- strip_prefix = "heck-0.3.3",
- build_file = Label("//cargo/remote:BUILD.heck-0.3.3.bazel"),
- )
-
maybe(
http_archive,
name = "raze__hermit_abi__0_1_19",
build_file = Label("//cargo/remote:BUILD.hex-0.4.3.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__hmac__0_10_1",
+ url = "https://crates.io/api/v1/crates/hmac/0.10.1/download",
+ type = "tar.gz",
+ sha256 = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15",
+ strip_prefix = "hmac-0.10.1",
+ build_file = Label("//cargo/remote:BUILD.hmac-0.10.1.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__http__0_2_4",
maybe(
http_archive,
- name = "raze__hyper_timeout__0_4_1",
- url = "https://crates.io/api/v1/crates/hyper-timeout/0.4.1/download",
+ name = "raze__hyper_tls__0_5_0",
+ url = "https://crates.io/api/v1/crates/hyper-tls/0.5.0/download",
type = "tar.gz",
- sha256 = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1",
- strip_prefix = "hyper-timeout-0.4.1",
- build_file = Label("//cargo/remote:BUILD.hyper-timeout-0.4.1.bazel"),
+ sha256 = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905",
+ strip_prefix = "hyper-tls-0.5.0",
+ build_file = Label("//cargo/remote:BUILD.hyper-tls-0.5.0.bazel"),
)
maybe(
build_file = Label("//cargo/remote:BUILD.instant-0.1.10.bazel"),
)
- maybe(
- http_archive,
- name = "raze__itertools__0_10_1",
- url = "https://crates.io/api/v1/crates/itertools/0.10.1/download",
- type = "tar.gz",
- sha256 = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf",
- strip_prefix = "itertools-0.10.1",
- build_file = Label("//cargo/remote:BUILD.itertools-0.10.1.bazel"),
- )
-
maybe(
http_archive,
name = "raze__itoa__0_4_8",
maybe(
http_archive,
- name = "raze__multimap__0_8_3",
- url = "https://crates.io/api/v1/crates/multimap/0.8.3/download",
+ name = "raze__native_tls__0_2_8",
+ url = "https://crates.io/api/v1/crates/native-tls/0.2.8/download",
type = "tar.gz",
- sha256 = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a",
- strip_prefix = "multimap-0.8.3",
- build_file = Label("//cargo/remote:BUILD.multimap-0.8.3.bazel"),
+ sha256 = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d",
+ strip_prefix = "native-tls-0.2.8",
+ build_file = Label("//cargo/remote:BUILD.native-tls-0.2.8.bazel"),
)
maybe(
build_file = Label("//cargo/remote:BUILD.opaque-debug-0.3.0.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__openssl__0_10_36",
+ url = "https://crates.io/api/v1/crates/openssl/0.10.36/download",
+ type = "tar.gz",
+ sha256 = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a",
+ strip_prefix = "openssl-0.10.36",
+ build_file = Label("//cargo/remote:BUILD.openssl-0.10.36.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__openssl_probe__0_1_4",
build_file = Label("//cargo/remote:BUILD.openssl-probe-0.1.4.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__openssl_sys__0_9_67",
+ url = "https://crates.io/api/v1/crates/openssl-sys/0.9.67/download",
+ type = "tar.gz",
+ sha256 = "69df2d8dfc6ce3aaf44b40dec6f487d5a886516cf6879c49e98e0710f310a058",
+ strip_prefix = "openssl-sys-0.9.67",
+ build_file = Label("//cargo/remote:BUILD.openssl-sys-0.9.67.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__parking__2_0_0",
build_file = Label("//cargo/remote:BUILD.percent-encoding-2.1.0.bazel"),
)
- maybe(
- http_archive,
- name = "raze__petgraph__0_5_1",
- url = "https://crates.io/api/v1/crates/petgraph/0.5.1/download",
- type = "tar.gz",
- sha256 = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7",
- strip_prefix = "petgraph-0.5.1",
- build_file = Label("//cargo/remote:BUILD.petgraph-0.5.1.bazel"),
- )
-
maybe(
http_archive,
name = "raze__pin_project__1_0_8",
build_file = Label("//cargo/remote:BUILD.prometheus-0.12.0.bazel"),
)
- maybe(
- http_archive,
- name = "raze__prost__0_8_0",
- url = "https://crates.io/api/v1/crates/prost/0.8.0/download",
- type = "tar.gz",
- sha256 = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020",
- strip_prefix = "prost-0.8.0",
- build_file = Label("//cargo/remote:BUILD.prost-0.8.0.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__prost_build__0_8_0",
- url = "https://crates.io/api/v1/crates/prost-build/0.8.0/download",
- type = "tar.gz",
- sha256 = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603",
- strip_prefix = "prost-build-0.8.0",
- build_file = Label("//cargo/remote:BUILD.prost-build-0.8.0.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__prost_derive__0_8_0",
- url = "https://crates.io/api/v1/crates/prost-derive/0.8.0/download",
- type = "tar.gz",
- sha256 = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba",
- strip_prefix = "prost-derive-0.8.0",
- build_file = Label("//cargo/remote:BUILD.prost-derive-0.8.0.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__prost_types__0_8_0",
- url = "https://crates.io/api/v1/crates/prost-types/0.8.0/download",
- type = "tar.gz",
- sha256 = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b",
- strip_prefix = "prost-types-0.8.0",
- build_file = Label("//cargo/remote:BUILD.prost-types-0.8.0.bazel"),
- )
-
maybe(
http_archive,
name = "raze__protobuf__2_25_1",
build_file = Label("//cargo/remote:BUILD.termcolor-1.1.2.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__testcontainers__0_12_0",
+ url = "https://crates.io/api/v1/crates/testcontainers/0.12.0/download",
+ type = "tar.gz",
+ sha256 = "d5e3ed6e3598dbf32cba8cb356b881c085e0adea57597f387723430dd94b4084",
+ strip_prefix = "testcontainers-0.12.0",
+ build_file = Label("//cargo/remote:BUILD.testcontainers-0.12.0.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__thiserror__1_0_29",
build_file = Label("//cargo/remote:BUILD.tokio-1.11.0.bazel"),
)
- maybe(
- http_archive,
- name = "raze__tokio_io_timeout__1_1_1",
- url = "https://crates.io/api/v1/crates/tokio-io-timeout/1.1.1/download",
- type = "tar.gz",
- sha256 = "90c49f106be240de154571dd31fbe48acb10ba6c6dd6f6517ad603abffa42de9",
- strip_prefix = "tokio-io-timeout-1.1.1",
- build_file = Label("//cargo/remote:BUILD.tokio-io-timeout-1.1.1.bazel"),
- )
-
maybe(
http_archive,
name = "raze__tokio_macros__1_3_0",
maybe(
http_archive,
- name = "raze__tokio_rustls__0_22_0",
- url = "https://crates.io/api/v1/crates/tokio-rustls/0.22.0/download",
+ name = "raze__tokio_native_tls__0_3_0",
+ url = "https://crates.io/api/v1/crates/tokio-native-tls/0.3.0/download",
type = "tar.gz",
- sha256 = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6",
- strip_prefix = "tokio-rustls-0.22.0",
- build_file = Label("//cargo/remote:BUILD.tokio-rustls-0.22.0.bazel"),
+ sha256 = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b",
+ strip_prefix = "tokio-native-tls-0.3.0",
+ build_file = Label("//cargo/remote:BUILD.tokio-native-tls-0.3.0.bazel"),
)
maybe(
http_archive,
- name = "raze__tokio_stream__0_1_7",
- url = "https://crates.io/api/v1/crates/tokio-stream/0.1.7/download",
+ name = "raze__tokio_rustls__0_22_0",
+ url = "https://crates.io/api/v1/crates/tokio-rustls/0.22.0/download",
type = "tar.gz",
- sha256 = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f",
- strip_prefix = "tokio-stream-0.1.7",
- build_file = Label("//cargo/remote:BUILD.tokio-stream-0.1.7.bazel"),
+ sha256 = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6",
+ strip_prefix = "tokio-rustls-0.22.0",
+ build_file = Label("//cargo/remote:BUILD.tokio-rustls-0.22.0.bazel"),
)
maybe(
build_file = Label("//cargo/remote:BUILD.toml-0.5.8.bazel"),
)
- maybe(
- http_archive,
- name = "raze__tonic__0_5_2",
- url = "https://crates.io/api/v1/crates/tonic/0.5.2/download",
- type = "tar.gz",
- sha256 = "796c5e1cd49905e65dd8e700d4cb1dffcbfdb4fc9d017de08c1a537afd83627c",
- strip_prefix = "tonic-0.5.2",
- build_file = Label("//cargo/remote:BUILD.tonic-0.5.2.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__tonic_build__0_5_2",
- url = "https://crates.io/api/v1/crates/tonic-build/0.5.2/download",
- type = "tar.gz",
- sha256 = "12b52d07035516c2b74337d2ac7746075e7dcae7643816c1b12c5ff8a7484c08",
- strip_prefix = "tonic-build-0.5.2",
- build_file = Label("//cargo/remote:BUILD.tonic-build-0.5.2.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__tower__0_4_8",
- url = "https://crates.io/api/v1/crates/tower/0.4.8/download",
- type = "tar.gz",
- sha256 = "f60422bc7fefa2f3ec70359b8ff1caff59d785877eb70595904605bcc412470f",
- strip_prefix = "tower-0.4.8",
- build_file = Label("//cargo/remote:BUILD.tower-0.4.8.bazel"),
- )
-
- maybe(
- http_archive,
- name = "raze__tower_layer__0_3_1",
- url = "https://crates.io/api/v1/crates/tower-layer/0.3.1/download",
- type = "tar.gz",
- sha256 = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62",
- strip_prefix = "tower-layer-0.3.1",
- build_file = Label("//cargo/remote:BUILD.tower-layer-0.3.1.bazel"),
- )
-
maybe(
http_archive,
name = "raze__tower_service__0_3_1",
build_file = Label("//cargo/remote:BUILD.tracing-0.1.26.bazel"),
)
- maybe(
- http_archive,
- name = "raze__tracing_attributes__0_1_15",
- url = "https://crates.io/api/v1/crates/tracing-attributes/0.1.15/download",
- type = "tar.gz",
- sha256 = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2",
- strip_prefix = "tracing-attributes-0.1.15",
- build_file = Label("//cargo/remote:BUILD.tracing-attributes-0.1.15.bazel"),
- )
-
maybe(
http_archive,
name = "raze__tracing_core__0_1_19",
build_file = Label("//cargo/remote:BUILD.tracing-core-0.1.19.bazel"),
)
- maybe(
- http_archive,
- name = "raze__tracing_futures__0_2_5",
- url = "https://crates.io/api/v1/crates/tracing-futures/0.2.5/download",
- type = "tar.gz",
- sha256 = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2",
- strip_prefix = "tracing-futures-0.2.5",
- build_file = Label("//cargo/remote:BUILD.tracing-futures-0.2.5.bazel"),
- )
-
maybe(
http_archive,
name = "raze__try_lock__0_2_3",
build_file = Label("//cargo/remote:BUILD.unicode-normalization-0.1.19.bazel"),
)
- maybe(
- http_archive,
- name = "raze__unicode_segmentation__1_8_0",
- url = "https://crates.io/api/v1/crates/unicode-segmentation/1.8.0/download",
- type = "tar.gz",
- sha256 = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b",
- strip_prefix = "unicode-segmentation-1.8.0",
- build_file = Label("//cargo/remote:BUILD.unicode-segmentation-1.8.0.bazel"),
- )
-
maybe(
http_archive,
name = "raze__unicode_xid__0_2_2",
build_file = Label("//cargo/remote:BUILD.utf-8-0.7.6.bazel"),
)
+ maybe(
+ http_archive,
+ name = "raze__vcpkg__0_2_15",
+ url = "https://crates.io/api/v1/crates/vcpkg/0.2.15/download",
+ type = "tar.gz",
+ sha256 = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426",
+ strip_prefix = "vcpkg-0.2.15",
+ build_file = Label("//cargo/remote:BUILD.vcpkg-0.2.15.bazel"),
+ )
+
maybe(
http_archive,
name = "raze__version_check__0_9_3",
build_file = Label("//cargo/remote:BUILD.webpki-roots-0.21.1.bazel"),
)
- maybe(
- http_archive,
- name = "raze__which__4_2_2",
- url = "https://crates.io/api/v1/crates/which/4.2.2/download",
- type = "tar.gz",
- sha256 = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9",
- strip_prefix = "which-4.2.2",
- build_file = Label("//cargo/remote:BUILD.which-4.2.2.bazel"),
- )
-
maybe(
http_archive,
name = "raze__winapi__0_3_9",
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-# buildifier: disable=out-of-order-load
-# buildifier: disable=load-on-top
-load(
- "@rules_rust//cargo:cargo_build_script.bzl",
- "cargo_build_script",
-)
-
-cargo_build_script(
- name = "anyhow_build_script",
- srcs = glob(["**/*.rs"]),
- build_script_env = {
- },
- crate_features = [
- "default",
- "std",
- ],
- crate_root = "build.rs",
- data = glob(["**"]),
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "1.0.43",
- visibility = ["//visibility:private"],
- deps = [
- ],
-)
-
-rust_library(
- name = "anyhow",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "default",
- "std",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "1.0.43",
- # buildifier: leave-alone
- deps = [
- ":anyhow_build_script",
- ],
-)
-
-# Unsupported target "compiletest" with type "test" omitted
-
-# Unsupported target "test_autotrait" with type "test" omitted
-
-# Unsupported target "test_backtrace" with type "test" omitted
-
-# Unsupported target "test_boxed" with type "test" omitted
-
-# Unsupported target "test_chain" with type "test" omitted
-
-# Unsupported target "test_context" with type "test" omitted
-
-# Unsupported target "test_convert" with type "test" omitted
-
-# Unsupported target "test_downcast" with type "test" omitted
-
-# Unsupported target "test_ffi" with type "test" omitted
-
-# Unsupported target "test_fmt" with type "test" omitted
-
-# Unsupported target "test_macros" with type "test" omitted
-
-# Unsupported target "test_repr" with type "test" omitted
-
-# Unsupported target "test_source" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-# Unsupported target "tcp_accept" with type "example" omitted
-
-rust_library(
- name = "async_stream",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- proc_macro_deps = [
- "@raze__async_stream_impl__0_3_2//:async_stream_impl",
- ],
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.3.2",
- # buildifier: leave-alone
- deps = [
- "@raze__futures_core__0_3_17//:futures_core",
- ],
-)
-
-# Unsupported target "for_await" with type "test" omitted
-
-# Unsupported target "stream" with type "test" omitted
-
-# Unsupported target "try_stream" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "async_stream_impl",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "proc-macro",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.3.2",
- # buildifier: leave-alone
- deps = [
- "@raze__proc_macro2__1_0_29//:proc_macro2",
- "@raze__quote__1_0_9//:quote",
- "@raze__syn__1_0_76//:syn",
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+rust_library(
+ name = "crypto_mac",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.10.1",
+ # buildifier: leave-alone
+ deps = [
+ "@raze__generic_array__0_14_4//:generic_array",
+ "@raze__subtle__2_4_1//:subtle",
+ ],
+)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-rust_library(
- name = "either",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "default",
- "use_std",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2015",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "1.6.1",
- # buildifier: leave-alone
- deps = [
- ],
-)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-# Unsupported target "benches" with type "bench" omitted
-
-rust_library(
- name = "fixedbitset",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2015",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.2.0",
- # buildifier: leave-alone
- deps = [
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+rust_library(
+ name = "foreign_types",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2015",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.3.2",
+ # buildifier: leave-alone
+ deps = [
+ "@raze__foreign_types_shared__0_1_1//:foreign_types_shared",
+ ],
+)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+rust_library(
+ name = "foreign_types_shared",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2015",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.1.1",
+ # buildifier: leave-alone
+ deps = [
+ ],
+)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-rust_library(
- name = "heck",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.3.3",
- # buildifier: leave-alone
- deps = [
- "@raze__unicode_segmentation__1_8_0//:unicode_segmentation",
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+rust_library(
+ name = "hmac",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.10.1",
+ # buildifier: leave-alone
+ deps = [
+ "@raze__crypto_mac__0_10_1//:crypto_mac",
+ "@raze__digest__0_9_0//:digest",
+ ],
+)
+
+# Unsupported target "lib" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-# Unsupported target "client" with type "example" omitted
-
-rust_library(
- name = "hyper_timeout",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.4.1",
- # buildifier: leave-alone
- deps = [
- "@raze__hyper__0_14_12//:hyper",
- "@raze__pin_project_lite__0_2_7//:pin_project_lite",
- "@raze__tokio__1_11_0//:tokio",
- "@raze__tokio_io_timeout__1_1_1//:tokio_io_timeout",
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+# Unsupported target "client" with type "example" omitted
+
+rust_library(
+ name = "hyper_tls",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.5.0",
+ # buildifier: leave-alone
+ deps = [
+ "@raze__bytes__1_1_0//:bytes",
+ "@raze__hyper__0_14_12//:hyper",
+ "@raze__native_tls__0_2_8//:native_tls",
+ "@raze__tokio__1_11_0//:tokio",
+ "@raze__tokio_native_tls__0_3_0//:tokio_native_tls",
+ ],
+)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-# Unsupported target "bench1" with type "bench" omitted
-
-# Unsupported target "combinations" with type "bench" omitted
-
-# Unsupported target "combinations_with_replacement" with type "bench" omitted
-
-# Unsupported target "fold_specialization" with type "bench" omitted
-
-# Unsupported target "powerset" with type "bench" omitted
-
-# Unsupported target "tree_fold1" with type "bench" omitted
-
-# Unsupported target "tuple_combinations" with type "bench" omitted
-
-# Unsupported target "tuples" with type "bench" omitted
-
-# Unsupported target "iris" with type "example" omitted
-
-rust_library(
- name = "itertools",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "default",
- "use_alloc",
- "use_std",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.10.1",
- # buildifier: leave-alone
- deps = [
- "@raze__either__1_6_1//:either",
- ],
-)
-
-# Unsupported target "adaptors_no_collect" with type "test" omitted
-
-# Unsupported target "flatten_ok" with type "test" omitted
-
-# Unsupported target "fold_specialization" with type "test" omitted
-
-# Unsupported target "macros_hygiene" with type "test" omitted
-
-# Unsupported target "merge_join" with type "test" omitted
-
-# Unsupported target "peeking_take_while" with type "test" omitted
-
-# Unsupported target "quick" with type "test" omitted
-
-# Unsupported target "specializations" with type "test" omitted
-
-# Unsupported target "test_core" with type "test" omitted
-
-# Unsupported target "test_std" with type "test" omitted
-
-# Unsupported target "tuples" with type "test" omitted
-
-# Unsupported target "zip" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-rust_library(
- name = "multimap",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2015",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.8.3",
- # buildifier: leave-alone
- deps = [
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+# buildifier: disable=out-of-order-load
+# buildifier: disable=load-on-top
+load(
+ "@rules_rust//cargo:cargo_build_script.bzl",
+ "cargo_build_script",
+)
+
+cargo_build_script(
+ name = "native_tls_build_script",
+ srcs = glob(["**/*.rs"]),
+ build_script_env = {
+ },
+ crate_features = [
+ ],
+ crate_root = "build.rs",
+ data = glob(["**"]),
+ edition = "2015",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.2.8",
+ visibility = ["//visibility:private"],
+ deps = [
+ ] + selects.with_or({
+ # cfg(any(target_os = "macos", target_os = "ios"))
+ (
+ "@rules_rust//rust/platform:aarch64-apple-darwin",
+ "@rules_rust//rust/platform:aarch64-apple-ios",
+ "@rules_rust//rust/platform:i686-apple-darwin",
+ "@rules_rust//rust/platform:x86_64-apple-darwin",
+ "@rules_rust//rust/platform:x86_64-apple-ios",
+ ): [
+ "@raze__security_framework_sys__2_4_2//:security_framework_sys",
+ ],
+ "//conditions:default": [],
+ }) + selects.with_or({
+ # cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))
+ (
+ "@rules_rust//rust/platform:aarch64-linux-android",
+ "@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
+ "@rules_rust//rust/platform:arm-unknown-linux-gnueabi",
+ "@rules_rust//rust/platform:i686-linux-android",
+ "@rules_rust//rust/platform:i686-unknown-freebsd",
+ "@rules_rust//rust/platform:i686-unknown-linux-gnu",
+ "@rules_rust//rust/platform:powerpc-unknown-linux-gnu",
+ "@rules_rust//rust/platform:s390x-unknown-linux-gnu",
+ "@rules_rust//rust/platform:wasm32-unknown-unknown",
+ "@rules_rust//rust/platform:wasm32-wasi",
+ "@rules_rust//rust/platform:x86_64-linux-android",
+ "@rules_rust//rust/platform:x86_64-unknown-freebsd",
+ "@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
+ ): [
+ "@raze__openssl_sys__0_9_67//:openssl_sys",
+ ],
+ "//conditions:default": [],
+ }) + selects.with_or({
+ # cfg(target_os = "windows")
+ (
+ "@rules_rust//rust/platform:i686-pc-windows-msvc",
+ "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
+ ): [
+ ],
+ "//conditions:default": [],
+ }),
+)
+
+# Unsupported target "google-connect" with type "example" omitted
+
+# Unsupported target "simple-server" with type "example" omitted
+
+rust_library(
+ name = "native_tls",
+ srcs = glob(["**/*.rs"]),
+ aliases = {
+ },
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2015",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.2.8",
+ # buildifier: leave-alone
+ deps = [
+ ":native_tls_build_script",
+ ] + selects.with_or({
+ # cfg(any(target_os = "macos", target_os = "ios"))
+ (
+ "@rules_rust//rust/platform:aarch64-apple-darwin",
+ "@rules_rust//rust/platform:aarch64-apple-ios",
+ "@rules_rust//rust/platform:i686-apple-darwin",
+ "@rules_rust//rust/platform:x86_64-apple-darwin",
+ "@rules_rust//rust/platform:x86_64-apple-ios",
+ ): [
+ "@raze__lazy_static__1_4_0//:lazy_static",
+ "@raze__libc__0_2_101//:libc",
+ "@raze__security_framework__2_4_2//:security_framework",
+ "@raze__security_framework_sys__2_4_2//:security_framework_sys",
+ "@raze__tempfile__3_2_0//:tempfile",
+ ],
+ "//conditions:default": [],
+ }) + selects.with_or({
+ # cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))
+ (
+ "@rules_rust//rust/platform:aarch64-linux-android",
+ "@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
+ "@rules_rust//rust/platform:arm-unknown-linux-gnueabi",
+ "@rules_rust//rust/platform:i686-linux-android",
+ "@rules_rust//rust/platform:i686-unknown-freebsd",
+ "@rules_rust//rust/platform:i686-unknown-linux-gnu",
+ "@rules_rust//rust/platform:powerpc-unknown-linux-gnu",
+ "@rules_rust//rust/platform:s390x-unknown-linux-gnu",
+ "@rules_rust//rust/platform:wasm32-unknown-unknown",
+ "@rules_rust//rust/platform:wasm32-wasi",
+ "@rules_rust//rust/platform:x86_64-linux-android",
+ "@rules_rust//rust/platform:x86_64-unknown-freebsd",
+ "@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
+ ): [
+ "@raze__log__0_4_14//:log",
+ "@raze__openssl__0_10_36//:openssl",
+ "@raze__openssl_probe__0_1_4//:openssl_probe",
+ "@raze__openssl_sys__0_9_67//:openssl_sys",
+ ],
+ "//conditions:default": [],
+ }) + selects.with_or({
+ # cfg(target_os = "windows")
+ (
+ "@rules_rust//rust/platform:i686-pc-windows-msvc",
+ "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
+ ): [
+ "@raze__schannel__0_1_19//:schannel",
+ ],
+ "//conditions:default": [],
+ }),
+)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # Apache-2.0 from expression "Apache-2.0"
+])
+
+# Generated Targets
+# buildifier: disable=out-of-order-load
+# buildifier: disable=load-on-top
+load(
+ "@rules_rust//cargo:cargo_build_script.bzl",
+ "cargo_build_script",
+)
+
+cargo_build_script(
+ name = "openssl_build_script",
+ srcs = glob(["**/*.rs"]),
+ build_script_env = {
+ },
+ crate_features = [
+ ],
+ crate_root = "build.rs",
+ data = glob(["**"]),
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.10.36",
+ visibility = ["//visibility:private"],
+ deps = [
+ "@raze__openssl_sys__0_9_67//:openssl_sys",
+ ],
+)
+
+# Unsupported target "mk_certs" with type "example" omitted
+
+rust_library(
+ name = "openssl",
+ srcs = glob(["**/*.rs"]),
+ aliases = {
+ "@raze__openssl_sys__0_9_67//:openssl_sys": "ffi",
+ },
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.10.36",
+ # buildifier: leave-alone
+ deps = [
+ ":openssl_build_script",
+ "@raze__bitflags__1_3_2//:bitflags",
+ "@raze__cfg_if__1_0_0//:cfg_if",
+ "@raze__foreign_types__0_3_2//:foreign_types",
+ "@raze__libc__0_2_101//:libc",
+ "@raze__once_cell__1_8_0//:once_cell",
+ "@raze__openssl_sys__0_9_67//:openssl_sys",
+ ],
+)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT"
+])
+
+# Generated Targets
+# buildifier: disable=out-of-order-load
+# buildifier: disable=load-on-top
+load(
+ "@rules_rust//cargo:cargo_build_script.bzl",
+ "cargo_build_script",
+)
+
+cargo_build_script(
+ name = "openssl_sys_build_script",
+ srcs = glob(["**/*.rs"]),
+ build_script_env = {
+ },
+ crate_features = [
+ ],
+ crate_root = "build/main.rs",
+ data = glob(["**"]),
+ edition = "2015",
+ links = "openssl",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.9.67",
+ visibility = ["//visibility:private"],
+ deps = [
+ "@raze__autocfg__1_0_1//:autocfg",
+ "@raze__cc__1_0_70//:cc",
+ "@raze__pkg_config__0_3_19//:pkg_config",
+ ] + selects.with_or({
+ # cfg(target_env = "msvc")
+ (
+ "@rules_rust//rust/platform:i686-pc-windows-msvc",
+ "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
+ ): [
+ "@raze__vcpkg__0_2_15//:vcpkg",
+ ],
+ "//conditions:default": [],
+ }),
+)
+
+rust_library(
+ name = "openssl_sys",
+ srcs = glob(["**/*.rs"]),
+ aliases = {
+ },
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2015",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.9.67",
+ # buildifier: leave-alone
+ deps = [
+ ":openssl_sys_build_script",
+ "@raze__libc__0_2_101//:libc",
+ ] + selects.with_or({
+ # cfg(target_env = "msvc")
+ (
+ "@rules_rust//rust/platform:i686-pc-windows-msvc",
+ "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
+ ): [
+ ],
+ "//conditions:default": [],
+ }),
+)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-# Unsupported target "dijkstra" with type "bench" omitted
-
-# Unsupported target "iso" with type "bench" omitted
-
-# Unsupported target "matrix_graph" with type "bench" omitted
-
-# Unsupported target "ograph" with type "bench" omitted
-
-# Unsupported target "stable_graph" with type "bench" omitted
-
-# Unsupported target "unionfind" with type "bench" omitted
-
-rust_library(
- name = "petgraph",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.5.1",
- # buildifier: leave-alone
- deps = [
- "@raze__fixedbitset__0_2_0//:fixedbitset",
- "@raze__indexmap__1_7_0//:indexmap",
- ],
-)
-
-# Unsupported target "graph" with type "test" omitted
-
-# Unsupported target "graphmap" with type "test" omitted
-
-# Unsupported target "iso" with type "test" omitted
-
-# Unsupported target "quickcheck" with type "test" omitted
-
-# Unsupported target "stable_graph" with type "test" omitted
-
-# Unsupported target "unionfind" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # Apache-2.0 from expression "Apache-2.0"
-])
-
-# Generated Targets
-
-# Unsupported target "varint" with type "bench" omitted
-
-rust_library(
- name = "prost",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "default",
- "prost-derive",
- "std",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- proc_macro_deps = [
- "@raze__prost_derive__0_8_0//:prost_derive",
- ],
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.8.0",
- # buildifier: leave-alone
- deps = [
- "@raze__bytes__1_1_0//:bytes",
- ],
-)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # Apache-2.0 from expression "Apache-2.0"
-])
-
-# Generated Targets
-# buildifier: disable=out-of-order-load
-# buildifier: disable=load-on-top
-load(
- "@rules_rust//cargo:cargo_build_script.bzl",
- "cargo_build_script",
-)
-
-cargo_build_script(
- name = "prost_build_build_script",
- srcs = glob(["**/*.rs"]),
- build_script_env = {
- },
- crate_features = [
- ],
- crate_root = "build.rs",
- data = glob(["**"]),
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.8.0",
- visibility = ["//visibility:private"],
- deps = [
- "@raze__which__4_2_2//:which",
- ],
-)
-
-rust_library(
- name = "prost_build",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.8.0",
- # buildifier: leave-alone
- deps = [
- ":prost_build_build_script",
- "@raze__bytes__1_1_0//:bytes",
- "@raze__heck__0_3_3//:heck",
- "@raze__itertools__0_10_1//:itertools",
- "@raze__log__0_4_14//:log",
- "@raze__multimap__0_8_3//:multimap",
- "@raze__petgraph__0_5_1//:petgraph",
- "@raze__prost__0_8_0//:prost",
- "@raze__prost_types__0_8_0//:prost_types",
- "@raze__tempfile__3_2_0//:tempfile",
- ],
-)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # Apache-2.0 from expression "Apache-2.0"
-])
-
-# Generated Targets
-
-rust_library(
- name = "prost_derive",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "proc-macro",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.8.0",
- # buildifier: leave-alone
- deps = [
- "@raze__anyhow__1_0_43//:anyhow",
- "@raze__itertools__0_10_1//:itertools",
- "@raze__proc_macro2__1_0_29//:proc_macro2",
- "@raze__quote__1_0_9//:quote",
- "@raze__syn__1_0_76//:syn",
- ],
-)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # Apache-2.0 from expression "Apache-2.0"
-])
-
-# Generated Targets
-
-rust_library(
- name = "prost_types",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.8.0",
- # buildifier: leave-alone
- deps = [
- "@raze__bytes__1_1_0//:bytes",
- "@raze__prost__0_8_0//:prost",
- ],
-)
"libc",
"rand_chacha",
"rand_hc",
- "small_rng",
"std",
"std_rng",
],
srcs = glob(["**/*.rs"]),
crate_features = [
"OSX_10_9",
+ "default",
],
crate_root = "src/lib.rs",
crate_type = "lib",
aliases = {
},
crate_features = [
+ "default",
+ "std",
],
crate_root = "src/lib.rs",
crate_type = "lib",
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+rust_library(
+ name = "testcontainers",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.12.0",
+ # buildifier: leave-alone
+ deps = [
+ "@raze__hex__0_4_3//:hex",
+ "@raze__hmac__0_10_1//:hmac",
+ "@raze__log__0_4_14//:log",
+ "@raze__rand__0_8_4//:rand",
+ "@raze__serde__1_0_130//:serde",
+ "@raze__serde_json__1_0_67//:serde_json",
+ "@raze__sha2__0_9_6//:sha2",
+ ],
+)
+
+# Unsupported target "cli_client" with type "test" omitted
+
+# Unsupported target "images" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-rust_library(
- name = "tokio_io_timeout",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "1.1.1",
- # buildifier: leave-alone
- deps = [
- "@raze__pin_project_lite__0_2_7//:pin_project_lite",
- "@raze__tokio__1_11_0//:tokio",
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT"
+])
+
+# Generated Targets
+
+# Unsupported target "download-rust-lang" with type "example" omitted
+
+# Unsupported target "echo" with type "example" omitted
+
+rust_library(
+ name = "tokio_native_tls",
+ srcs = glob(["**/*.rs"]),
+ aliases = {
+ },
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2018",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.3.0",
+ # buildifier: leave-alone
+ deps = [
+ "@raze__native_tls__0_2_8//:native_tls",
+ "@raze__tokio__1_11_0//:tokio",
+ ] + selects.with_or({
+ # cfg(all(not(target_os = "macos"), not(windows), not(target_os = "ios")))
+ (
+ "@rules_rust//rust/platform:aarch64-linux-android",
+ "@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
+ "@rules_rust//rust/platform:arm-unknown-linux-gnueabi",
+ "@rules_rust//rust/platform:i686-linux-android",
+ "@rules_rust//rust/platform:i686-unknown-freebsd",
+ "@rules_rust//rust/platform:i686-unknown-linux-gnu",
+ "@rules_rust//rust/platform:powerpc-unknown-linux-gnu",
+ "@rules_rust//rust/platform:s390x-unknown-linux-gnu",
+ "@rules_rust//rust/platform:wasm32-unknown-unknown",
+ "@rules_rust//rust/platform:wasm32-wasi",
+ "@rules_rust//rust/platform:x86_64-linux-android",
+ "@rules_rust//rust/platform:x86_64-unknown-freebsd",
+ "@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
+ ): [
+ ],
+ "//conditions:default": [],
+ }) + selects.with_or({
+ # cfg(any(target_os = "macos", target_os = "ios"))
+ (
+ "@rules_rust//rust/platform:aarch64-apple-darwin",
+ "@rules_rust//rust/platform:aarch64-apple-ios",
+ "@rules_rust//rust/platform:i686-apple-darwin",
+ "@rules_rust//rust/platform:x86_64-apple-darwin",
+ "@rules_rust//rust/platform:x86_64-apple-ios",
+ ): [
+ ],
+ "//conditions:default": [],
+ }) + selects.with_or({
+ # cfg(windows)
+ (
+ "@rules_rust//rust/platform:i686-pc-windows-msvc",
+ "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
+ ): [
+ ],
+ "//conditions:default": [],
+ }),
+)
+
+# Unsupported target "bad" with type "test" omitted
+
+# Unsupported target "google" with type "test" omitted
+
+# Unsupported target "smoke" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "tokio_stream",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "default",
- "time",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.1.7",
- # buildifier: leave-alone
- deps = [
- "@raze__futures_core__0_3_17//:futures_core",
- "@raze__pin_project_lite__0_2_7//:pin_project_lite",
- "@raze__tokio__1_11_0//:tokio",
- ],
-)
-
-# Unsupported target "async_send_sync" with type "test" omitted
-
-# Unsupported target "stream_chain" with type "test" omitted
-
-# Unsupported target "stream_collect" with type "test" omitted
-
-# Unsupported target "stream_empty" with type "test" omitted
-
-# Unsupported target "stream_fuse" with type "test" omitted
-
-# Unsupported target "stream_iter" with type "test" omitted
-
-# Unsupported target "stream_merge" with type "test" omitted
-
-# Unsupported target "stream_once" with type "test" omitted
-
-# Unsupported target "stream_pending" with type "test" omitted
-
-# Unsupported target "stream_stream_map" with type "test" omitted
-
-# Unsupported target "stream_timeout" with type "test" omitted
-
-# Unsupported target "time_throttle" with type "test" omitted
-
-# Unsupported target "watch" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-# Unsupported target "decode" with type "bench" omitted
-
-rust_library(
- name = "tonic",
- srcs = glob(["**/*.rs"]),
- aliases = {
- "@raze__prost__0_8_0//:prost": "prost1",
- },
- crate_features = [
- "async-trait",
- "codegen",
- "default",
- "h2",
- "hyper",
- "hyper-timeout",
- "prost",
- "prost-derive",
- "prost1",
- "tokio",
- "tower",
- "tracing-futures",
- "transport",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- proc_macro_deps = [
- "@raze__async_trait__0_1_51//:async_trait",
- "@raze__prost_derive__0_8_0//:prost_derive",
- ],
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.5.2",
- # buildifier: leave-alone
- deps = [
- "@raze__async_stream__0_3_2//:async_stream",
- "@raze__base64__0_13_0//:base64",
- "@raze__bytes__1_1_0//:bytes",
- "@raze__futures_core__0_3_17//:futures_core",
- "@raze__futures_util__0_3_17//:futures_util",
- "@raze__h2__0_3_4//:h2",
- "@raze__http__0_2_4//:http",
- "@raze__http_body__0_4_3//:http_body",
- "@raze__hyper__0_14_12//:hyper",
- "@raze__hyper_timeout__0_4_1//:hyper_timeout",
- "@raze__percent_encoding__2_1_0//:percent_encoding",
- "@raze__pin_project__1_0_8//:pin_project",
- "@raze__prost__0_8_0//:prost",
- "@raze__tokio__1_11_0//:tokio",
- "@raze__tokio_stream__0_1_7//:tokio_stream",
- "@raze__tokio_util__0_6_8//:tokio_util",
- "@raze__tower__0_4_8//:tower",
- "@raze__tower_layer__0_3_1//:tower_layer",
- "@raze__tower_service__0_3_1//:tower_service",
- "@raze__tracing__0_1_26//:tracing",
- "@raze__tracing_futures__0_2_5//:tracing_futures",
- ],
-)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "tonic_build",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "prost",
- "prost-build",
- "transport",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.5.2",
- # buildifier: leave-alone
- deps = [
- "@raze__proc_macro2__1_0_29//:proc_macro2",
- "@raze__prost_build__0_8_0//:prost_build",
- "@raze__quote__1_0_9//:quote",
- "@raze__syn__1_0_76//:syn",
- ],
-)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-# Unsupported target "tower-balance" with type "example" omitted
-
-rust_library(
- name = "tower",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "balance",
- "buffer",
- "default",
- "discover",
- "futures-util",
- "indexmap",
- "limit",
- "load",
- "log",
- "make",
- "rand",
- "ready-cache",
- "slab",
- "timeout",
- "tokio",
- "tokio-stream",
- "tokio-util",
- "tracing",
- "util",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.4.8",
- # buildifier: leave-alone
- deps = [
- "@raze__futures_core__0_3_17//:futures_core",
- "@raze__futures_util__0_3_17//:futures_util",
- "@raze__indexmap__1_7_0//:indexmap",
- "@raze__pin_project__1_0_8//:pin_project",
- "@raze__rand__0_8_4//:rand",
- "@raze__slab__0_4_4//:slab",
- "@raze__tokio__1_11_0//:tokio",
- "@raze__tokio_stream__0_1_7//:tokio_stream",
- "@raze__tokio_util__0_6_8//:tokio_util",
- "@raze__tower_layer__0_3_1//:tower_layer",
- "@raze__tower_service__0_3_1//:tower_service",
- "@raze__tracing__0_1_26//:tracing",
- ],
-)
-
-# Unsupported target "balance" with type "test" omitted
-
-# Unsupported target "buffer" with type "test" omitted
-
-# Unsupported target "builder" with type "test" omitted
-
-# Unsupported target "hedge" with type "test" omitted
-
-# Unsupported target "limit" with type "test" omitted
-
-# Unsupported target "load_shed" with type "test" omitted
-
-# Unsupported target "ready_cache" with type "test" omitted
-
-# Unsupported target "retry" with type "test" omitted
-
-# Unsupported target "spawn_ready" with type "test" omitted
-
-# Unsupported target "steer" with type "test" omitted
-
-# Unsupported target "support" with type "test" omitted
-
-# Unsupported target "util" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "tower_layer",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.3.1",
- # buildifier: leave-alone
- deps = [
- ],
-)
aliases = {
},
crate_features = [
- "attributes",
- "default",
- "log",
"std",
- "tracing-attributes",
],
crate_root = "src/lib.rs",
crate_type = "lib",
data = [],
edition = "2018",
- proc_macro_deps = [
- "@raze__tracing_attributes__0_1_15//:tracing_attributes",
- ],
rustc_flags = [
"--cap-lints=allow",
],
# buildifier: leave-alone
deps = [
"@raze__cfg_if__1_0_0//:cfg_if",
- "@raze__log__0_4_14//:log",
"@raze__pin_project_lite__0_2_7//:pin_project_lite",
"@raze__tracing_core__0_1_19//:tracing_core",
] + selects.with_or({
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "tracing_attributes",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "proc-macro",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.1.15",
- # buildifier: leave-alone
- deps = [
- "@raze__proc_macro2__1_0_29//:proc_macro2",
- "@raze__quote__1_0_9//:quote",
- "@raze__syn__1_0_76//:syn",
- ],
-)
-
-# Unsupported target "async_fn" with type "test" omitted
-
-# Unsupported target "destructuring" with type "test" omitted
-
-# Unsupported target "err" with type "test" omitted
-
-# Unsupported target "fields" with type "test" omitted
-
-# Unsupported target "instrument" with type "test" omitted
-
-# Unsupported target "levels" with type "test" omitted
-
-# Unsupported target "names" with type "test" omitted
-
-# Unsupported target "support" with type "test" omitted
-
-# Unsupported target "targets" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "tracing_futures",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- "default",
- "pin-project",
- "std",
- "std-future",
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "0.2.5",
- # buildifier: leave-alone
- deps = [
- "@raze__pin_project__1_0_8//:pin_project",
- "@raze__tracing__0_1_26//:tracing",
- ],
-)
-
-# Unsupported target "std_future" with type "test" omitted
-
-# Unsupported target "support" with type "test" omitted
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT OR Apache-2.0"
-])
-
-# Generated Targets
-
-# Unsupported target "graphemes" with type "bench" omitted
-
-# Unsupported target "unicode_words" with type "bench" omitted
-
-# Unsupported target "word_bounds" with type "bench" omitted
-
-rust_library(
- name = "unicode_segmentation",
- srcs = glob(["**/*.rs"]),
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "1.8.0",
- # buildifier: leave-alone
- deps = [
- ],
-)
--- /dev/null
+"""
+@generated
+cargo-raze crate build file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+# buildifier: disable=load
+load("@bazel_skylib//lib:selects.bzl", "selects")
+
+# buildifier: disable=load
+load(
+ "@rules_rust//rust:rust.bzl",
+ "rust_binary",
+ "rust_library",
+ "rust_test",
+)
+
+package(default_visibility = [
+ # Public for visibility by "@raze__crate__version//" targets.
+ #
+ # Prefer access through "//cargo", which limits external
+ # visibility to explicit Cargo.toml dependencies.
+ "//visibility:public",
+])
+
+licenses([
+ "notice", # MIT from expression "MIT OR Apache-2.0"
+])
+
+# Generated Targets
+
+rust_library(
+ name = "vcpkg",
+ srcs = glob(["**/*.rs"]),
+ crate_features = [
+ ],
+ crate_root = "src/lib.rs",
+ crate_type = "lib",
+ data = [],
+ edition = "2015",
+ rustc_flags = [
+ "--cap-lints=allow",
+ ],
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+ version = "0.2.15",
+ # buildifier: leave-alone
+ deps = [
+ ],
+)
+++ /dev/null
-"""
-@generated
-cargo-raze crate build file.
-
-DO NOT EDIT! Replaced on runs of cargo-raze
-"""
-
-# buildifier: disable=load
-load("@bazel_skylib//lib:selects.bzl", "selects")
-
-# buildifier: disable=load
-load(
- "@rules_rust//rust:rust.bzl",
- "rust_binary",
- "rust_library",
- "rust_test",
-)
-
-package(default_visibility = [
- # Public for visibility by "@raze__crate__version//" targets.
- #
- # Prefer access through "//cargo", which limits external
- # visibility to explicit Cargo.toml dependencies.
- "//visibility:public",
-])
-
-licenses([
- "notice", # MIT from expression "MIT"
-])
-
-# Generated Targets
-
-rust_library(
- name = "which",
- srcs = glob(["**/*.rs"]),
- aliases = {
- },
- crate_features = [
- ],
- crate_root = "src/lib.rs",
- crate_type = "lib",
- data = [],
- edition = "2018",
- rustc_flags = [
- "--cap-lints=allow",
- ],
- tags = [
- "cargo-raze",
- "manual",
- ],
- version = "4.2.2",
- # buildifier: leave-alone
- deps = [
- "@raze__either__1_6_1//:either",
- "@raze__libc__0_2_101//:libc",
- ] + selects.with_or({
- # cfg(windows)
- (
- "@rules_rust//rust/platform:i686-pc-windows-msvc",
- "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
- ): [
- "@raze__lazy_static__1_4_0//:lazy_static",
- ],
- "//conditions:default": [],
- }),
-)
-
-# Unsupported target "basic" with type "test" omitted
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
prometheus = "0.12.0"
-nats = "0.15.2"
\ No newline at end of file
+nats = "0.15.2"
+testcontainers = "0.12.0"
\ No newline at end of file
],
)
+alias(
+ name = "testcontainers",
+ actual = "@raze__testcontainers__0_12_0//:testcontainers",
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+)
+
alias(
name = "tokio",
actual = "@raze__tokio__1_11_0//:tokio",
use std::env;
-use config::{Config, ConfigError, Environment, File, Source};
+use config::{Config, ConfigError, Environment, File};
use log::info;
use serde::Deserialize;
/// Initializes a new configuration like the other components of nova
/// And starts the prometheus metrics server if needed.
pub fn new(service_name: &str) -> Result<Settings<T>, ConfigError> {
+ pretty_env_logger::init();
+
let mut default = Config::default();
// this file my be shared with all the components
default.merge(File::with_name("config/default"))?;
default.merge(File::with_name("config/local").required(false))?;
let env = Environment::with_prefix("NOVA").separator("__");
- println!("{:?}", env.collect());
// we can configure each component using environment variables
default.merge(env)?;
let mut config: Settings<T> = default.clone().try_into().unwrap();
// try to load the config
config.config = default.get::<T>(&service_name).unwrap();
- pretty_env_logger::init();
// start the monitoring system if needed
crate::monitoring::start_monitoring(&config.monitoring);
Ok(config)
}
}
+
+pub fn test_init() {
+ pretty_env_logger::init();
+}
pub mod nats;
pub mod payloads;
pub mod error;
+
+pub use log as log;
+pub use serde as serde;
+pub use ::config as config_crate;
+pub use prometheus as prometheus;
+pub use ::nats as nats_crate;
+pub use testcontainers as testcontainers;
\ No newline at end of file
use hyper::{
- Response, Body, Request, Server,
- header::{CONTENT_TYPE},
+ header::CONTENT_TYPE,
service::{make_service_fn, service_fn},
+ Body, Request, Response, Server,
};
-use std::net::ToSocketAddrs;
+use log::{error, info};
use prometheus::{Encoder, TextEncoder};
-use log::{info,error};
use serde::Deserialize;
+use std::net::ToSocketAddrs;
#[derive(Clone, Debug, Deserialize)]
/// Options for the monitoring service
pub struct MonitoringConfiguration {
- enabled: bool,
- address: Option<String>,
- port: Option<i32>,
+ pub enabled: bool,
+ pub address: Option<String>,
+ pub port: Option<i32>,
}
/// Handler for the hyper http server
let config = configuration.clone();
tokio::task::spawn(async move {
if config.enabled {
- let address = format!("{}:{}",
- config.address.expect("a listening address must be specified for the metrics server"),
- config.port.expect("a listening port must be specified for the metrics server")
+ let address = format!(
+ "{}:{}",
+ config
+ .address
+ .expect("a listening address must be specified for the metrics server"),
+ config
+ .port
+ .expect("a listening port must be specified for the metrics server")
);
info!("Starting monitoring server on {}", address);
-
- let listen_address = address
- .to_socket_addrs()
- .unwrap()
- .next()
- .unwrap();
+
+ let listen_address = address.to_socket_addrs().unwrap().next().unwrap();
let server = Server::bind(&listen_address).serve(make_service_fn(|_| async {
Ok::<_, hyper::Error>(service_fn(serve_metrics))
}));
}
}
});
-}
\ No newline at end of file
+}
-use nats::{Options, Connection};
+use nats::{Connection, Options};
use serde::Deserialize;
#[derive(Clone, Debug, Deserialize)]
-struct NatsConfigurationClientCert {
- cert: String,
- key: String
+pub struct NatsConfigurationClientCert {
+ pub cert: String,
+ pub key: String,
}
#[derive(Clone, Debug, Deserialize)]
-struct NatsConfigurationTls {
- mtu: Option<usize>,
+pub struct NatsConfigurationTls {
+ pub mtu: Option<usize>,
}
#[derive(Clone, Debug, Deserialize)]
pub struct NatsConfiguration {
- client_cert: Option<NatsConfigurationClientCert>,
- root_cert: Option<Vec<String>>,
- jetstream_api_prefix: Option<String>,
- max_reconnects: Option<usize>,
- reconnect_buffer_size: Option<usize>,
- tls: Option<NatsConfigurationTls>,
- client_name: Option<String>,
- tls_required: Option<bool>,
- host: String,
+ pub client_cert: Option<NatsConfigurationClientCert>,
+ pub root_cert: Option<Vec<String>>,
+ pub jetstream_api_prefix: Option<String>,
+ pub max_reconnects: Option<usize>,
+ pub reconnect_buffer_size: Option<usize>,
+ pub tls: Option<NatsConfigurationTls>,
+ pub client_name: Option<String>,
+ pub tls_required: Option<bool>,
+ pub host: String,
}
+// Allows the configuration to directly create a nats connection
impl Into<Connection> for NatsConfiguration {
fn into(self) -> Connection {
let mut options = Options::new();
-
+
if let Some(client_cert) = self.client_cert {
options = options.client_cert(client_cert.cert, client_cert.key);
}
options = options.tls_required(self.tls_required.unwrap_or(false));
options = options.with_name(&self.client_name.unwrap_or("Nova".to_string()));
-
if let Some(tls) = self.tls {
let mut config = nats::rustls::ClientConfig::new();
config.set_mtu(&tls.mtu);
use serde::{Deserialize, Serialize};
use std::fmt::Debug;
-
-
/// Data structure sent to the cache component
/// by the gateway & webhook.
#[derive(Serialize, Deserialize, Debug)]
package common
+// This is a file that will be replaced
+// by the `version_template` target in bazel
+
const (
VERSION = "$VERSION"
)
--- /dev/null
+{
+ "monitoring": {
+ "enabled": false
+ },
+ "nats": {
+ "host": "localhost"
+ },
+ "rest": {
+ "server": {
+ "port": 8000,
+ "address": "0.0.0.0"
+ },
+ "discord": {
+ "token": "<your token>"
+ }
+ }
+}
\ No newline at end of file
services:
nats:
image: 'nats'
- expose:
- - "4222:422"
ports:
- "8222:8222"
- "4222:4222"
hostname: nats-server
+ redis:
+ image: 'redis'
+ ports:
+ - "6379:6379"
+ hostname: redis
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
- editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/docs/',
+ editUrl: 'https://github.com/discordnova/nova/edit/main/docs/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
[dependencies]
common = { path = "../common/rust" }
-tokio = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "*", features = ["rustls-tls"] }
+tokio = { version = "1", features = ["full"] }
+
url = "2.2.2"
futures-util = "0.3.17"
futures = "0.3.17"
-log = { version = "0.4", features = ["std"] }
serde_json = { version = "1.0" }
serde = { version = "1.0", features = ["derive"] }
num-traits = "0.2"
num-derive = "0.3"
-num = "0.4"
\ No newline at end of file
+num = "0.4"
+++ /dev/null
-# Gateway\r
-\r
-The gateway component managed the connexion with the Discord event gateway using a websocket connexion.
\ No newline at end of file
],
)
-alias(
- name = "log",
- actual = "@raze__log__0_4_14//:log",
- tags = [
- "cargo-raze",
- "manual",
- ],
-)
-
alias(
name = "num",
actual = "@raze__num__0_4_0//:num",
+++ /dev/null
-[monitoring]
-enabled = false
-
-[nats]
-host = "localhost"
-
-[gateway]
-max_reconnects = 5
-reconnect_delay_growth_factor = 1.25
-reconnect_delay_minimum = 5000
-reconnect_delay_maximum = 60000
-intents = 32767
use super::Connection;
use futures::{FutureExt, Sink, SinkExt, Stream, StreamExt};
-use log::info;
+use common::log::info;
use serde::Serialize;
use std::{
pin::Pin,
use std::str::from_utf8;
use tokio_tungstenite::tungstenite::Message;
-use log::info;
+use common::log::info;
use crate::error::GatewayError;
use std::env;
use futures::SinkExt;
-use log::{debug, error, info};
+use common::log::{debug, error, info};
use serde::Serialize;
use serde_json::Value;
use std::fmt::Debug;
use super::{state::ConnectionState, ConnectionWithState, Shard};
use futures::StreamExt;
-use log::{error, info};
-use tokio::{select, time::{Instant, sleep}};
+use common::{log::{error, info}};
+use tokio::{select, time::{Instant, interval_at, sleep}};
impl Shard {
pub async fn start(self: &mut Self) {
info!("Server hello received");
self._util_set_seq(msg.sequence);
if let Some(conn) = &mut self.connection {
- conn.state.interval = Some(tokio::time::interval_at(
+ conn.state.interval = Some(interval_at(
Instant::now() + Duration::from_millis(msg.data.heartbeat_interval),
Duration::from_millis(msg.data.heartbeat_interval),
));
+++ /dev/null
-# Novactl\r
-\r
-Novactl is a simple command-line utility used to interact with your nova projects, and the nova infrastructure.
\ No newline at end of file
+++ /dev/null
-load("@rules_rust//rust:rust.bzl", "rust_binary")
-load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
-load("//cargo:crates.bzl", "all_crate_deps", "crate_deps")
-load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
-
-test_suite(name = "tests")
-
-cargo_build_script(
- name = "build_script",
- srcs = ["build.rs"],
- build_script_env = {
- "PROTOC": "$(location @com_google_protobuf//:protoc)",
- },
- data = [
- "//ratelimiter/proto:nova.ratelimit.v1alpha.proto",
- ] + [
- "@com_google_protobuf//:protoc",
- "@com_google_protobuf//:protobuf_headers",
- ],
- deps = all_crate_deps() + crate_deps(["tonic-build"]),
-)
-
-rust_binary(
- name = "ratelimiter",
- srcs = ["src/main.rs"],
- visibility = ["//visibility:public"],
- deps = all_crate_deps() + [":build_script"],
-)
-
-rust_image(
- name = "image",
- srcs = ["src/main.rs"],
- base = "//bazel:base",
- visibility = ["//visibility:public"],
- deps = all_crate_deps() + [":build_script"],
-)
+++ /dev/null
-[package]\r
-name = "rest-ratelimiter"\r
-version = "0.1.0"\r
-edition = "2018"\r
-\r
-[dependencies]\r
-tonic = "0.5"\r
-prost = "0.8"\r
-tokio = { version = "1", features = ["full"] }\r
-\r
-[[bin]]\r
-name = "rest-ratelimiter"\r
-path = "src/main.rs"\r
-\r
-[build-dependencies]\r
-tonic-build = { version = "0.5", features = ["transport", "prost"], default-features = false }\r
-\r
-[dev-dependencies]\r
-tonic-build = { version = "0.5", features = ["transport", "prost"], default-features = false }\r
-\r
+++ /dev/null
-# Ratelimiter\r
-\r
-This is an implementation of the ratelimiting service described in the `proto/nova.ratelimit.v1.proto`.\r
-The library is divied in two part, a Rust library, built as a static library, and a rust executable that implements\r
-the rate limiting algorithm. A FFI interface is exposed by the Rust static library for use in the nova-lite component.
\ No newline at end of file
+++ /dev/null
-fn main() -> Result<(), Box<dyn std::error::Error>> {\r
- tonic_build::compile_protos("proto/nova.ratelimit.v1alpha.proto").unwrap();\r
- Ok(())\r
-}\r
+++ /dev/null
-load("@rules_proto//proto:defs.bzl", "proto_library")
-load("@io_bazel_rules_go//go:def.bzl", "go_library")
-load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
-
-exports_files(["nova.ratelimit.v1alpha.proto"])
-
-proto_library(
- name = "nova_ratelimit_v1_proto",
- srcs = ["nova.ratelimit.v1alpha.proto"],
- visibility = ["//visibility:public"],
-)
-
-go_proto_library(
- name = "nova_ratelimit_v1_go_proto",
- compilers = ["@io_bazel_rules_go//proto:go_grpc"],
- importpath = "github.com/discordnova/nova/ratelimiter/proto",
- proto = ":nova_ratelimit_v1_proto",
- visibility = ["//visibility:public"],
-)
-
-go_library(
- name = "proto",
- embed = [":nova_ratelimit_v1_go_proto"],
- importpath = "github.com/discordnova/nova/ratelimiter/proto",
- visibility = ["//visibility:public"],
-)
+++ /dev/null
-// How does this works ?
-// Every request, the proxy (envoy) requests the rate-limiting service if
-// the requested route bucket or global rate-limit is hit.
-
-syntax = "proto3";
-package nova.ratelimit.v1alpha;
-
-// The reponse of a RatelimitRequest, it includes the status of the reponse and
-// the bucket informations.
-message RatelimitResponse {
- enum Status {
- OK = 0;
- RATELIMITED = 1;
- GLOBAL_RATELIMITED = 2;
- }
- Status status = 1;
- bool updateAsked = 2;
-}
-
-// Requests the ratelimit status of a route request, it also takes the
-// indentifiables of the request in question.
-message RatelimitRequest {
- string routeName = 1;
- repeated string indentifiables = 2;
-}
-
-// Used when "updateAsked" is sed to true
-// this means the bucket is unknown to the ratelimit server.
-message CreateBucketData {
- RatelimitRequest request = 1;
- int32 limit = 2;
- int32 remaining = 3;
- int32 reset = 4;
-}
-
-service RatelimitService {
- rpc GetRatelimitStatus (RatelimitRequest) returns (RatelimitResponse);
- rpc CreateBucket (CreateBucketData) returns (CreateBucketData);
-}
\ No newline at end of file
+++ /dev/null
-// Some implementation of the gRPC service using the shared library.\r
-\r
-pub mod ratelimit_pb {\r
- tonic::include_proto!("nova.ratelimit.v1alpha");\r
-}\r
-\r
-use ratelimit_pb::ratelimit_service_server::{RatelimitService, RatelimitServiceServer};\r
-use ratelimit_pb::{CreateBucketData, RatelimitRequest, RatelimitResponse};\r
-use std::error::Error;\r
-use tonic::transport::Server;\r
-use tonic::{Request, Response, Status};\r
-\r
-#[derive(Default)]\r
-pub struct MyRatelimitService {}\r
-\r
-#[tonic::async_trait]\r
-impl RatelimitService for MyRatelimitService {\r
- async fn get_ratelimit_status(\r
- &self,\r
- _request: Request<RatelimitRequest>,\r
- ) -> Result<Response<RatelimitResponse>, Status> {\r
- return Err(Status::not_found("Not implmented"));\r
- }\r
- async fn create_bucket(\r
- &self,\r
- _request: Request<CreateBucketData>,\r
- ) -> Result<Response<CreateBucketData>, Status> {\r
- return Err(tonic::Status::not_found("Not implmented"));\r
- }\r
-}\r
-\r
-#[tokio::main]\r
-async fn main() -> Result<(), Box<dyn Error>> {\r
- let addr = "[::1]:50051".parse().unwrap();\r
- let service = MyRatelimitService::default();\r
-\r
- println!("GreeterServer listening on {}", addr);\r
-\r
- Server::builder()\r
- .add_service(RatelimitServiceServer::new(service))\r
- .serve(addr)\r
- .await?;\r
-\r
- Ok(())\r
-}\r
--- /dev/null
+load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_test")
+load("//cargo:crates.bzl", "all_crate_deps")
+load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
+
+test_suite(name = "tests")
+
+rust_binary(
+ name = "rest",
+ srcs = glob(["src/**"]),
+ visibility = ["//visibility:public"],
+ deps = all_crate_deps() + ["//common/rust:common"],
+)
+
+rust_test(
+ name = "rest_test",
+ crate = ":rest",
+)
+
+rust_image(
+ name = "image",
+ base = "//bazel:base",
+ binary = ":rest",
+ visibility = ["//visibility:public"],
+)
--- /dev/null
+[package]
+name = "rest"
+version = "0.1.0"
+edition = "2018"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+common = { path = "../common/rust" }
+hyper = { version = "0.14", features = ["full"] }
+tokio = { version = "1", features = ["full"] }
+serde = { version = "1.0.8", features = ["derive"] }
+futures-util = "0.3.17"
+hyper-tls = "0.5.0"
--- /dev/null
+"""
+@generated
+cargo-raze generated Bazel file.
+
+DO NOT EDIT! Replaced on runs of cargo-raze
+"""
+
+package(default_visibility = ["//visibility:public"])
+
+licenses([
+ "notice", # See individual crates for specific licenses
+])
+
+# Aliased targets
+alias(
+ name = "futures_util",
+ actual = "@raze__futures_util__0_3_17//:futures_util",
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+)
+
+alias(
+ name = "hyper",
+ actual = "@raze__hyper__0_14_12//:hyper",
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+)
+
+alias(
+ name = "hyper_tls",
+ actual = "@raze__hyper_tls__0_5_0//:hyper_tls",
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+)
+
+alias(
+ name = "serde",
+ actual = "@raze__serde__1_0_130//:serde",
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+)
+
+alias(
+ name = "tokio",
+ actual = "@raze__tokio__1_11_0//:tokio",
+ tags = [
+ "cargo-raze",
+ "manual",
+ ],
+)
--- /dev/null
+use serde::Deserialize;
+
+#[derive(Debug, Deserialize, Clone, Default)]
+pub struct ServerSettings {
+ pub port: u16,
+ pub address: String,
+}
+
+#[derive(Debug, Deserialize, Clone, Default)]
+pub struct Discord {
+ pub token: String
+}
+
+#[derive(Debug, Deserialize, Clone, Default)]
+pub struct Config {
+ pub server: ServerSettings,
+ pub discord: Discord,
+}
--- /dev/null
+use std::{convert::Infallible, sync::Arc};
+
+use crate::config::Config;
+use common::{config::Settings, log::{error, info}};
+use hyper::{server::conn::AddrStream, service::make_service_fn, Server};
+use std::net::ToSocketAddrs;
+
+use crate::proxy::ServiceProxy;
+
+mod config;
+mod proxy;
+
+#[tokio::main]
+async fn main() {
+ let settings: Settings<Config> = Settings::new("rest").unwrap();
+ let config = Arc::new(settings.config);
+
+ let addr = format!("{}:{}", config.server.address, config.server.port)
+ .to_socket_addrs()
+ .unwrap()
+ .next()
+ .unwrap();
+
+ let service_fn = make_service_fn(move |_: &AddrStream| {
+ let service_proxy = ServiceProxy::new(config.clone());
+ async move { Ok::<_, Infallible>(service_proxy) }
+ });
+
+ let server = Server::bind(&addr).serve(service_fn);
+
+ info!("starting ratelimit server");
+ if let Err(e) = server.await {
+ error!("server error: {}", e);
+ }
+}
--- /dev/null
+use crate::config::Config;
+use futures_util::future::TryFutureExt;
+use hyper::{
+ client::HttpConnector, header::HeaderValue, http::uri::Parts, service::Service, Body, Client,
+ HeaderMap, Request, Response, Uri,
+};
+use hyper_tls::HttpsConnector;
+use std::{future::Future, pin::Pin, sync::Arc, task::Poll};
+
+#[derive(Clone)]
+pub struct ServiceProxy {
+ client: Client<HttpsConnector<HttpConnector>>,
+ config: Arc<Config>,
+}
+
+impl Service<Request<Body>> for ServiceProxy {
+ type Response = Response<Body>;
+ type Error = hyper::Error;
+ type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
+
+ fn poll_ready(
+ &mut self,
+ cx: &mut std::task::Context<'_>,
+ ) -> std::task::Poll<Result<(), Self::Error>> {
+ match self.client.poll_ready(cx) {
+ Poll::Ready(Ok(())) => Poll::Ready(Ok(())),
+ Poll::Ready(Err(e)) => Poll::Ready(Err(e)),
+ Poll::Pending => Poll::Pending,
+ }
+ }
+
+ fn call(&mut self, mut req: Request<hyper::Body>) -> Self::Future {
+ let host = "discord.com";
+ let mut new_parts = Parts::default();
+
+ let path = req.uri().path().to_string();
+
+ new_parts.scheme = Some("https".parse().unwrap());
+ new_parts.authority = Some(host.parse().unwrap());
+ new_parts.path_and_query = Some(path.parse().unwrap());
+
+ *req.uri_mut() = Uri::from_parts(new_parts).unwrap();
+
+ let mut headers = HeaderMap::default();
+
+ headers.insert("Host", HeaderValue::from_str("discord.com").unwrap());
+ headers.insert(
+ "Authorization",
+ HeaderValue::from_str(&format!("Bot {}", self.config.discord.token)).unwrap(),
+ );
+
+ *req.headers_mut() = headers;
+ let res = self.client
+ .request(req)
+ .map_ok(move |res| {
+ if let Some(bucket) = res.headers().get("x-ratelimit-bucket") {
+
+ println!("bucket ratelimit! {:?} : {:?}", path, bucket);
+ }
+
+ res
+ });
+
+ return Box::pin(res);
+ }
+}
+
+impl ServiceProxy {
+ pub fn new(config: Arc<Config>) -> Self {
+ let https = HttpsConnector::new();
+ let client = Client::builder().build::<_, hyper::Body>(https);
+ ServiceProxy { client, config }
+ }
+}
[dependencies]
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
-log = { version = "0.4", features = ["std"] }
-config = "0.11"
+common = { path = "../common/rust" }
serde = { version = "1.0.8", features = ["derive"] }
libsodium-sys = "0.2.7"
hex = "0.4.3"
serde_json = { version = "1.0" }
-common = { path = "../common/rust" }
-nats = "0.15.2"
+libc = "0.2.101"
[[bin]]
name = "webhook"
])
# Aliased targets
-alias(
- name = "config",
- actual = "@raze__config__0_11_0//:config",
- tags = [
- "cargo-raze",
- "manual",
- ],
-)
-
alias(
name = "hex",
actual = "@raze__hex__0_4_3//:hex",
)
alias(
- name = "libsodium_sys",
- actual = "@raze__libsodium_sys__0_2_7//:libsodium_sys",
- tags = [
- "cargo-raze",
- "manual",
- ],
-)
-
-alias(
- name = "log",
- actual = "@raze__log__0_4_14//:log",
+ name = "libc",
+ actual = "@raze__libc__0_2_101//:libc",
tags = [
"cargo-raze",
"manual",
)
alias(
- name = "nats",
- actual = "@raze__nats__0_15_2//:nats",
+ name = "libsodium_sys",
+ actual = "@raze__libsodium_sys__0_2_7//:libsodium_sys",
tags = [
"cargo-raze",
"manual",
service::Service,
Body, Method, Request, Response, StatusCode,
};
-use log::{error, info, trace};
-use nats::Connection;
+use common::log::{error, info, trace};
+use common::nats_crate::Connection;
use serde::{Deserialize, Serialize};
-use std::{
- future::Future,
- io::{Error, ErrorKind},
- pin::Pin,
- str::from_utf8,
- sync::Arc,
- task::{Context, Poll},
-};
+use std::{future::Future, io::{Error, ErrorKind}, pin::Pin, str::from_utf8, sync::Arc, task::{Context, Poll}, time::Duration};
/// Hyper service used to handle the discord webhooks
#[derive(Clone)]
node_id: "".to_string(),
span: None,
},
+ operation: "".to_string(),
data: value,
})
.unwrap();
match self_clone
.nats
- .request("nova.cache.dispatch.interaction", payload)
+ .request_timeout("nova.cache.dispatch.interaction", payload, Duration::from_secs(2))
{
Ok(response) => Ok(Response::builder()
.header("Content-Type", "application/json")
use super::handler::HandlerService;
use crate::config::Config;
use hyper::service::Service;
-use nats::Connection;
+use common::nats_crate::Connection;
use std::{
future::{ready, Ready},
sync::Arc,
pub mod make_service;
mod signature;
mod handler;
-mod types;
\ No newline at end of file
+mod types;
+pub mod tests;
\ No newline at end of file
--- /dev/null
+fn generate_keypair() -> (
+ String,
+ [u8; libsodium_sys::crypto_sign_ed25519_SECRETKEYBYTES as usize],
+) {
+ use libsodium_sys::crypto_sign_ed25519_keypair;
+ let pk_s: String;
+
+ let mut pk = [0; libsodium_sys::crypto_sign_ed25519_PUBLICKEYBYTES as usize];
+ let mut sk = [0; libsodium_sys::crypto_sign_ed25519_SECRETKEYBYTES as usize];
+
+ let pk_p = pk.as_mut_ptr();
+ let sk_p = sk.as_mut_ptr();
+
+ // generate keypair
+ unsafe {
+ if crypto_sign_ed25519_keypair(pk_p, sk_p) < 0 {
+ panic!("keypair generation failed!");
+ }
+ };
+
+ pk_s = hex::encode(pk);
+ return (pk_s, sk);
+}
+
+fn sign_message(
+ msg: Vec<u8>,
+ sk: [u8; libsodium_sys::crypto_sign_ed25519_SECRETKEYBYTES as usize],
+) -> String {
+ use libc::c_ulonglong;
+ use libsodium_sys::crypto_sign_ed25519_detached;
+
+ let len = msg.len();
+ let mut signature_len: c_ulonglong = 0;
+ let mut str = [0; 64];
+ unsafe {
+ crypto_sign_ed25519_detached(
+ str.as_mut_ptr(),
+ &mut signature_len,
+ msg.as_ptr(),
+ len as u64,
+ sk.as_ptr(),
+ );
+ };
+
+ return hex::encode(str);
+}
+
+#[tokio::test]
+async fn respond_to_pings_and_deny_invalid() {
+ use crate::start;
+ use common::config::test_init;
+ use common::config::Settings;
+ use common::log::info;
+ use common::testcontainers::images::generic::GenericImage;
+ use common::testcontainers::Docker;
+ use hyper::{Body, Method, Request};
+ use libsodium_sys::sodium_init;
+ use serde_json::json;
+ use std::time::Duration;
+
+ test_init();
+
+ unsafe {
+ if sodium_init() < 0 {
+ panic!("libsodium init error!");
+ }
+ }
+
+ let (private_key, secret_key) = generate_keypair();
+ let ping = json!({ "type": 1 }).to_string();
+ let timestamp = "my datetime :)";
+ let signature_data = [timestamp.as_bytes().to_vec(), ping.as_bytes().to_vec()].concat();
+ let signature = sign_message(signature_data, secret_key);
+
+ // start nats
+ let docker = common::testcontainers::clients::Cli::default();
+ let image = GenericImage::new("nats");
+ let node = docker.run(image);
+ node.start();
+ let port = node.get_host_port(4222).unwrap();
+
+ let settings: Settings<crate::config::Config> = common::config::Settings {
+ config: crate::config::Config {
+ server: crate::config::ServerSettings {
+ port: 5003,
+ address: "0.0.0.0".to_string(),
+ },
+ discord: crate::config::Discord {
+ public_key: private_key,
+ client_id: 0,
+ },
+ },
+ monitoring: common::monitoring::MonitoringConfiguration {
+ enabled: false,
+ address: None,
+ port: None,
+ },
+ nats: common::nats::NatsConfiguration {
+ client_cert: None,
+ root_cert: None,
+ jetstream_api_prefix: None,
+ max_reconnects: None,
+ reconnect_buffer_size: None,
+ tls: None,
+ client_name: None,
+ tls_required: None,
+ host: format!("localhost:{}", port),
+ },
+ };
+
+ let nats: common::nats_crate::Connection = settings.nats.clone().into();
+ // start the server
+ tokio::task::spawn(start(settings));
+ tokio::time::sleep(Duration::from_secs(1)).await;
+
+ let req = Request::builder()
+ .method(Method::POST)
+ .uri("http://localhost:5003/")
+ .header("X-Signature-Ed25519", signature)
+ .header("X-Signature-Timestamp", timestamp)
+ .body(Body::from(ping.clone()))
+ .expect("request builder");
+ let client = hyper::client::Client::new();
+ let result = client.request(req).await.unwrap();
+ assert!(result.status() == 200);
+
+ let req = Request::builder()
+ .method(Method::POST)
+ .uri("http://localhost:5003/")
+ .header("X-Signature-Ed25519", "inva&lid signature :)")
+ .header("X-Signature-Timestamp", timestamp)
+ .body(Body::from(ping.clone()))
+ .expect("request builder");
+ let client = hyper::client::Client::new();
+ let result = client.request(req).await.unwrap();
+ assert!(result.status() == 401);
+
+ // setup nats mock listener
+ let sub = nats.subscribe("nova.cache.dispatch.interaction").unwrap();
+
+ let ping = json!({ "type": 0 }).to_string();
+ let timestamp = "my datetime :)";
+ let signature_data = [timestamp.as_bytes().to_vec(), ping.as_bytes().to_vec()].concat();
+ let signature = sign_message(signature_data, secret_key);
+
+ // we must timeout
+ let req = Request::builder()
+ .method(Method::POST)
+ .uri("http://localhost:5003/")
+ .header("X-Signature-Ed25519", signature.clone())
+ .header("X-Signature-Timestamp", timestamp)
+ .body(Body::from(ping.clone()))
+ .expect("request builder");
+ let client = hyper::client::Client::new();
+ let result = client.request(req).await.unwrap();
+ assert!(result.status() == 500);
+
+ sub.with_handler(move |msg| {
+ info!("Received {}", &msg);
+ msg.respond("ok :)").unwrap();
+ Ok(())
+ });
+
+ let req = Request::builder()
+ .method(Method::POST)
+ .uri("http://localhost:5003/")
+ .header("X-Signature-Ed25519", signature.clone())
+ .header("X-Signature-Timestamp", timestamp)
+ .body(Body::from(ping.clone()))
+ .expect("request builder");
+ let client = hyper::client::Client::new();
+ let result = client.request(req).await.unwrap();
+ assert!(result.status() == 200);
+}
--- /dev/null
+pub mod handler;
\ No newline at end of file
\r
use crate::config::Config;\r
use common::config::Settings;\r
+use common::log::{error, info};\r
use hyper::Server;\r
-use log::{error, info};\r
\r
#[tokio::main]\r
async fn main() {\r
let settings: Settings<Config> = Settings::new("webhook").unwrap();\r
- println!("{:?}", settings);\r
+ start(settings).await;\r
+}\r
\r
+async fn start(settings: Settings<Config>) {\r
let addr = format!(\r
"{}:{}",\r
settings.config.server.address, settings.config.server.port\r
settings.config.server.address, settings.config.server.port\r
);\r
\r
+ let config = Arc::new(settings.config);\r
let server = Server::bind(&addr).serve(MakeSvc {\r
- settings: settings.config.clone(),\r
+ settings: config,\r
nats: Arc::new(settings.nats.into()),\r
});\r
\r
if let Err(e) = server.await {\r
- error!("server error: {}", e);\r
+ panic!("server error: {}", e);\r
}\r
}\r