Skip to content

Commit fa32e53

Browse files
Add musl support
Signed-off-by: Kate Goldenring <[email protected]>
1 parent 4814a09 commit fa32e53

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spin-expressions = { git = "https://github.com/fermyon/spin", tag = "v2.6.0" }
1616
spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v2.6.0" }
1717
spin-telemetry = { git = "https://github.com/fermyon/spin", tag = "v2.6.0" }
1818
tokio = { version = "1.37", features = ["full"] }
19-
paho-mqtt = { version = "0.12.3", default-features = false, features = [
19+
paho-mqtt = { version = "0.12.3", features = [
2020
"vendored-ssl",
2121
] }
2222
wasmtime = { version = "21.0.1" }

build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fn is_musl() -> bool {
2+
std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "musl"
3+
}
4+
5+
fn main() {
6+
if is_musl() {
7+
// Required for OpenSSL with musl
8+
println!("cargo:rustc-link-arg=-lc");
9+
}
10+
}

0 commit comments

Comments
 (0)