diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7e0440db..a903f8bf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,11 +114,9 @@ jobs: os: ubuntu-24.04 target-cpu: x86-64 target: x86_64-unknown-linux-musl - #target-feature: -crt-static features: mimalloc cross: 'true' skip-publish: 'true' - build-exclude: 'imageflow_abi' - name: ARM64-linux-musl suffix: linux-musl-arm64 @@ -126,12 +124,10 @@ jobs: nuget-rid: linux-musl-arm64 os: ubuntu-24-arm-32gb target-cpu: generic - #target-feature: -crt-static target: aarch64-unknown-linux-musl features: mimalloc cross: 'true' skip-publish: 'true' - build-exclude: 'imageflow_abi' runs-on: ${{ matrix.os }} name: "${{ (matrix.cross == 'true') && 'cross ' || ''}}${{ matrix.name }}${{ matrix.target-cpu && format(' cpu: {0}', matrix.target-cpu) }}${{ matrix.target && format(' target: {0}', matrix.target) }}${{ matrix.features && format(' features: {0}', matrix.features) }} runs-on:${{ matrix.os }}" diff --git a/Cargo.toml b/Cargo.toml index 4eef34a3b..836394a26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,11 @@ resolver = "2" debug = true split-debuginfo = "packed" +# Musl-specific settings - strip symbols since these are static builds +[target.'cfg(target_env = "musl")'.profile.release] +strip = true # Strip symbols only for musl builds +lto = true # Keep link-time optimization for better size/performance + # RIAPI Tests take 600ms each at 0, 200ms each at 1, 36ms each at 2, 26ms each at 3 [profile.test] opt-level = 2 diff --git a/imageflow_abi/Cargo.toml b/imageflow_abi/Cargo.toml index add407afb..cc276be89 100644 --- a/imageflow_abi/Cargo.toml +++ b/imageflow_abi/Cargo.toml @@ -9,9 +9,14 @@ edition = "2021" [lib] name = "imageflow" doc = true +# Default crate type for non-musl targets crate-type = ["cdylib"] doctest = false +# Override crate-type for musl targets +[target.'cfg(target_env = "musl")'.lib] +crate-type = ["staticlib"] + [dependencies] libc = "0.2" imageflow_core = { path = "../imageflow_core", version = "*"}