Skip to content

Commit 36e6613

Browse files
authored
Make mysql use the native rust tls stack by default (tgstation#144)
1 parent 257fea8 commit 36e6613

File tree

3 files changed

+50
-8
lines changed

3 files changed

+50
-8
lines changed

.github/workflows/rust.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
toolchain: stable
2727
command: clippy
28-
args: --target i686-pc-windows-msvc --all-features --locked -- -D warnings
28+
args: --target i686-pc-windows-msvc --features all --locked -- -D warnings
2929

3030
- name: Rustfmt
3131
uses: actions-rs/cargo@v1
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
toolchain: stable
4141
command: build
42-
args: --target i686-pc-windows-msvc --release
42+
args: --target i686-pc-windows-msvc --locked --release
4343

4444
- uses: actions/upload-artifact@v3
4545
with:
@@ -78,21 +78,21 @@ jobs:
7878
with:
7979
toolchain: stable
8080
command: check
81-
args: --target i686-unknown-linux-gnu --all-features
81+
args: --target i686-unknown-linux-gnu --locked --features all
8282

8383
- name: Build (Debug) (all features)
8484
uses: actions-rs/cargo@v1
8585
with:
8686
toolchain: stable
8787
command: build
88-
args: --target i686-unknown-linux-gnu --all-features
88+
args: --target i686-unknown-linux-gnu --locked --features all
8989

9090
- name: Run tests (all features)
9191
uses: actions-rs/cargo@v1
9292
with:
9393
toolchain: stable
9494
command: test
95-
args: --target i686-unknown-linux-gnu --all-features
95+
args: --target i686-unknown-linux-gnu --locked --features all
9696
env:
9797
BYOND_BIN: /home/runner/BYOND/byond/bin
9898

@@ -101,7 +101,7 @@ jobs:
101101
with:
102102
toolchain: stable
103103
command: build
104-
args: --target i686-unknown-linux-gnu --release
104+
args: --target i686-unknown-linux-gnu --locked --release
105105

106106
- uses: actions/upload-artifact@v3
107107
with:

Cargo.lock

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ serde = { version = "1.0", optional = true, features = ["derive"] }
4646
serde_json = { version = "1.0", optional = true }
4747
lazy_static = { version = "1.4", optional = true }
4848
once_cell = { version = "1.17", optional = true }
49-
mysql = { version = "24.0", optional = true }
49+
mysql = { version = "24.0", default_features = false, optional = true}
5050
dashmap = { version = "5.4", optional = true }
5151
zip = { version = "0.6", optional = true }
5252
rand = { version = "0.8", optional = true }
@@ -69,12 +69,37 @@ default = [
6969
"json",
7070
"log",
7171
"noise",
72+
"rustls_tls",
7273
"sql",
7374
"time",
7475
"toml",
7576
"url",
7677
]
7778

79+
all = [
80+
"acreplace",
81+
"cellularnoise",
82+
"dmi",
83+
"file",
84+
"git",
85+
"http",
86+
"json",
87+
"log",
88+
"noise",
89+
"rustls_tls",
90+
"sql",
91+
"time",
92+
"toml",
93+
"url",
94+
"batchnoise",
95+
"hash",
96+
"pathfinder",
97+
"redis_pubsub",
98+
"redis_reliablequeue",
99+
"unzip",
100+
"worleynoise"
101+
]
102+
78103
# default features
79104
acreplace = ["aho-corasick"]
80105
cellularnoise = ["rand", "rayon"]
@@ -108,6 +133,10 @@ redis_reliablequeue = ["flume", "redis", "serde", "serde_json"]
108133
unzip = ["zip", "jobs"]
109134
worleynoise = ["rand", "rayon"]
110135

136+
# Use the native tls stack for the mysql db
137+
native_tls = ["mysql/default"]
138+
rustls_tls = ["mysql/default-rustls"]
139+
111140
# internal feature-like things
112141
jobs = ["flume"]
113142

0 commit comments

Comments
 (0)