Skip to content

iOS/macOS xcframework: import cactus fails as shipped — bundled cactus_engine.h includes cactus_graph.h, which is not in the framework #771

Description

@john-rocky

Summary

The iOS/macOS xcframeworks produced by apple/build.sh bundle a single header, cactus_engine.h, whose first include is:

#include "cactus_graph.h"

cactus_graph.h is not bundled into the framework (and is a C++ header), so import cactus fails to compile as shipped:

fatal error: 'cactus_graph.h' file not found
could not build module 'cactus'

Repro

  1. bash apple/build.sh (or cactus build --apple)
  2. Add apple/cactus-ios.xcframework to an Xcode project per bindings/swift/README.md
  3. import cactus in any Swift file → the error above (Xcode 27, iOS 27 SDK)

Note

Nothing in the FFI declarations of cactus_engine.h references graph types — the C surface is self-contained. So either of these fixes works:

  • drop the #include "cactus_graph.h" line from the header that gets bundled into the framework (what we do in our vendoring step), or
  • bundle cactus_graph.h + its transitive includes (heavier, and it pulls C++ headers into a C module map).

Found while integrating the engine as a benchmark arm at commit 1ace6d78; integration details in https://github.com/john-rocky/apple-silicon-llm-bench (ios/BenchmarkApp/scripts/bootstrap.sh, step 6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions