Since Swift Playgrounds 4 on iPad won’t allow any package dependencies that have non-Swift code in them, I’m wondering how feasible it is to separate whatever C dependencies that the swift-numerics package currently has. When I try to import any of the three products from the package I get
The target type, “ClangTarget”, is not supported.
I can’t figure out what is there that’s not pure Swift. I see a bunch of CMake files but no actual C code in the repository. Anybody with more familiarity with the project know what’s in there that’s not pure Swift?
Numerics depends on the _NumericsShims target, which is a header-only C library, providing bindings for the underlying system math library and relaxed floating-point operations that cannot currently be expressed in pure Swift.
All the shims that wrap __builtin_* could be replaced now (now that the Builtin module is exposed), but there's still a bunch of shims that wrap operations that are not just builtins.
We can add additional operations to the Builtin module to support this and eventually eliminate the shims, but Swift 5.9 does not have everything that we would need.