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
bash apple/build.sh (or cactus build --apple)
- Add
apple/cactus-ios.xcframework to an Xcode project per bindings/swift/README.md
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).
Summary
The iOS/macOS xcframeworks produced by
apple/build.shbundle a single header,cactus_engine.h, whose first include is:cactus_graph.his not bundled into the framework (and is a C++ header), soimport cactusfails to compile as shipped:Repro
bash apple/build.sh(orcactus build --apple)apple/cactus-ios.xcframeworkto an Xcode project perbindings/swift/README.mdimport cactusin any Swift file → the error above (Xcode 27, iOS 27 SDK)Note
Nothing in the FFI declarations of
cactus_engine.hreferences graph types — the C surface is self-contained. So either of these fixes works:#include "cactus_graph.h"line from the header that gets bundled into the framework (what we do in our vendoring step), orcactus_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).