Skip to content

Commit

Permalink
produce imageflow_abi on musl targets
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Jan 21, 2025
1 parent 401bcb3 commit 2076a2e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,24 +114,20 @@ 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
commit-suffix: linux_arm64_musl
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 }}"
Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions imageflow_abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "*"}
Expand Down

0 comments on commit 2076a2e

Please sign in to comment.