Skip to content

[Feature] macOS audio support and build targets #146

Description

@lqdev

Summary

Add macOS (x86_64-apple-darwin, aarch64-apple-darwin) as a supported build target. This includes CI workflows, build scripts, and testing CoreAudio output via rodio.

Related: #131 (Meta-Epic: Cross-Platform Audio Playback)

Problem / Background

The project currently builds for:

  • Windows: x86_64-pc-windows-msvc, aarch64-pc-windows-msvc
  • Linux: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu

macOS is not supported despite rodio supporting CoreAudio via cpal. The CI workflow (.github/workflows/release.yml) has no macOS job. No scripts/build-macos.sh exists.

Proposed Solution

1. CI Workflow

Add a build-macos job to .github/workflows/release.yml:

build-macos:
  runs-on: macos-latest
  strategy:
    matrix:
      target: [x86_64-apple-darwin, aarch64-apple-darwin]
  steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
      with:
        targets: ${{ matrix.target }}
    - run: cargo build --release --target ${{ matrix.target }}
    - run: cargo test --target ${{ matrix.target }}

2. Build Script

Create scripts/build-macos.sh following the pattern from scripts/build-linux.sh:

  • Auto-detect architecture (x86_64 vs arm64/aarch64)
  • Build with release profile
  • Create .tar.gz archive with checksums
  • Support universal binary via lipo (optional, stretch goal)

3. Packaging (Stretch)

  • Homebrew formula for brew install podcast-tui
  • .dmg disk image with drag-to-Applications
  • Code signing with Apple Developer ID (requires cert)

4. Documentation

  • Update docs/BUILD_SYSTEM.md with macOS instructions
  • Update README.md install section
  • Add macOS prerequisites (Xcode Command Line Tools)

Files to Modify

File Change
.github/workflows/release.yml Add build-macos job
scripts/build-macos.sh New — macOS build script
docs/BUILD_SYSTEM.md Add macOS section
README.md Update install instructions

Acceptance Criteria

  • CI builds macOS x86_64 and aarch64 binaries
  • Release artifacts include macOS tarballs with checksums
  • rodio audio output works on macOS (CoreAudio)
  • Build script auto-detects architecture
  • Documentation updated

Implementation Notes

  • macOS GitHub Actions runners are more expensive (3x Linux cost) — consider only running on release tags, not PRs
  • aarch64-apple-darwin cross-compilation on x86_64 runner requires Xcode and cargo build --target
  • rodio/cpal CoreAudio backend should work without extra dependencies on macOS
  • Test on both Intel and Apple Silicon if possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityaudioAudio playback componentenhancementNew feature or request

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions