Skip to content

Commit

Permalink
Make mysql use the native rust tls stack by default (tgstation#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
optimumtact authored and FluffyGhoster committed Mar 24, 2024
1 parent 6fa0fe0 commit 08ce515
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
toolchain: stable
command: clippy
args: --target i686-pc-windows-msvc --all-features --locked
args: --target i686-pc-windows-msvc --features all --locked -- -D warnings

- name: Rustfmt
uses: actions-rs/cargo@v1
Expand All @@ -41,7 +41,7 @@ jobs:
with:
toolchain: stable
command: build
args: --target i686-pc-windows-msvc --release
args: --target i686-pc-windows-msvc --locked --release

- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -79,21 +79,21 @@ jobs:
with:
toolchain: stable
command: check
args: --target i686-unknown-linux-gnu --all-features
args: --target i686-unknown-linux-gnu --locked --features all

- name: Build (Debug) (all features)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --target i686-unknown-linux-gnu --all-features
args: --target i686-unknown-linux-gnu --locked --features all

- name: Run tests (all features)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: test
args: --target i686-unknown-linux-gnu --all-features
args: --target i686-unknown-linux-gnu --locked --features all
env:
BYOND_BIN: /home/runner/BYOND/byond/bin

Expand All @@ -102,7 +102,7 @@ jobs:
with:
toolchain: stable
command: build
args: --target i686-unknown-linux-gnu --release
args: --target i686-unknown-linux-gnu --locked --release

- uses: actions/upload-artifact@v3
with:
Expand Down
15 changes: 14 additions & 1 deletion Cargo.lock

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

31 changes: 30 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
lazy_static = { version = "1.4", optional = true }
once_cell = { version = "1.17", optional = true }
mysql = { version = "24.0", optional = true }
mysql = { version = "24.0", default_features = false, optional = true}
dashmap = { version = "5.4", optional = true }
zip = { version = "0.6", optional = true }
rand = { version = "0.8", optional = true }
Expand Down Expand Up @@ -76,6 +76,7 @@ default = [
"json",
"log",
"noise",
"rustls_tls",
"sql",
"time",
"toml",
Expand All @@ -84,6 +85,30 @@ default = [
"url",
]

all = [
"acreplace",
"cellularnoise",
"dmi",
"file",
"git",
"http",
"json",
"log",
"noise",
"rustls_tls",
"sql",
"time",
"toml",
"url",
"batchnoise",
"hash",
"pathfinder",
"redis_pubsub",
"redis_reliablequeue",
"unzip",
"worleynoise"
]

# default features
acreplace = ["aho-corasick"]
auroranoise = ["fast_poisson"]
Expand Down Expand Up @@ -119,6 +144,10 @@ redis_reliablequeue = ["flume", "redis", "serde", "serde_json"]
unzip = ["zip", "jobs"]
worleynoise = ["rand", "rayon"]

# Use the native tls stack for the mysql db
native_tls = ["mysql/default"]
rustls_tls = ["mysql/default-rustls"]

# internal feature-like things
jobs = ["flume"]

Expand Down

0 comments on commit 08ce515

Please sign in to comment.