From b3f31ad694c3d6150c3621b7ba059e64c0cb3a7a Mon Sep 17 00:00:00 2001 From: xxkeming Date: Fri, 3 Apr 2026 21:09:30 +0800 Subject: [PATCH] fix(build): enable tokio_unstable in build script (#2376) Co-authored-by: houseme --- build-rustfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-rustfs.sh b/build-rustfs.sh index 0ed3352d6..82100ff68 100755 --- a/build-rustfs.sh +++ b/build-rustfs.sh @@ -213,7 +213,7 @@ setup_rust_environment() { # Set up environment variables for musl targets if [[ "$PLATFORM" == *"musl"* ]]; then print_message $YELLOW "Setting up environment for musl target..." - export RUSTFLAGS="-C target-feature=-crt-static" + export RUSTFLAGS="'--cfg tokio_unstable -C target-feature=-crt-static'" # For cargo-zigbuild, set up additional environment variables if command -v cargo-zigbuild &> /dev/null; then @@ -430,7 +430,7 @@ build_binary() { fi else # Native compilation - build_cmd="RUSTFLAGS=-Clink-arg=-lm cargo build" + build_cmd="RUSTFLAGS='--cfg tokio_unstable -Clink-arg=-lm' cargo build" fi if [ "$BUILD_TYPE" = "release" ]; then