Skip to content

Commit ca7bf03

Browse files
fix: Do not require zig for CI builds (#430)
* fix: Do not require zig for CI builds fixes #429 * chore: Update docs for - fix: Do not require zig for CI builds
1 parent 37bda06 commit ca7bf03

2 files changed

Lines changed: 16 additions & 24 deletions

File tree

crates/fff-core/build.rs

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
fn main() {
2-
// When the `zlob` feature is enabled (Zig-compiled C library):
3-
// On Windows MSVC, explicitly link the C runtime libraries.
4-
// Zig-compiled static libraries don't emit /DEFAULTLIB directives for the
5-
// MSVC CRT, so symbols like strcmp, memcpy etc. would be unresolved.
62
if std::env::var("CARGO_FEATURE_ZLOB").is_ok() {
3+
if !zig_available() {
4+
panic!(
5+
"The `zlob` feature is enabled but Zig is not installed. \
6+
Install Zig (https://ziglang.org/download/) or build without \
7+
`--features zlob`."
8+
);
9+
}
10+
711
let target = std::env::var("TARGET").unwrap_or_default();
812
if target.contains("windows") && target.contains("msvc") {
913
println!("cargo:rustc-link-lib=msvcrt");
1014
println!("cargo:rustc-link-lib=ucrt");
1115
println!("cargo:rustc-link-lib=vcruntime");
1216
}
13-
} else if std::env::var("CI").is_ok() {
14-
// CI must always build with zlob for production-quality binaries.
15-
if !zig_available() {
16-
panic!(
17-
"CI detected but Zig is not installed. \
18-
Please install Zig and build with `--features zlob`."
19-
);
20-
}
21-
panic!(
22-
"CI detected but `zlob` feature is not enabled. \
23-
Build with `--features zlob`."
24-
);
25-
} else {
17+
} else if std::env::var("CARGO_PRIMARY_PACKAGE").is_ok() && zig_available() {
2618
// Hint: if Zig is available but the zlob feature wasn't enabled,
2719
// let the developer know they can get faster glob matching.
28-
if zig_available() {
29-
println!(
30-
"cargo:warning=Zig detected but `zlob` feature is not enabled. \
31-
Build with `--features zlob` for faster glob matching."
32-
);
33-
}
20+
// Only emit this hint when this crate is the primary package to
21+
// avoid noisy warnings for downstream consumers.
22+
println!(
23+
"cargo:warning=Zig detected but `zlob` feature is not enabled. \
24+
Build with `--features zlob` for faster glob matching."
25+
);
3426
}
3527
}
3628

doc/fff.nvim.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*fff.nvim.txt*
2-
For Neovim >= 0.10.0 Last change: 2026 April 27
2+
For Neovim >= 0.10.0 Last change: 2026 April 30
33

44
==============================================================================
55
Table of Contents *fff.nvim-table-of-contents*

0 commit comments

Comments
 (0)