managedBridgeMmForwarder function

String managedBridgeMmForwarder(
  1. String relativePath
)

A nitrogen link managed .mm forwarder that wraps the generated C++ bridge so SPM compiles it as Obj-C++ and links the C ABI symbols.

It imports nothing itself. A bridge that needs Foundation imports it, and renames the Foundation names its own types would clash with while it does; an import here would come first and undo that.

relativePath is the relative path from the forwarder to .bridge.g.cpp.

Implementation

String managedBridgeMmForwarder(String relativePath) =>
    '// Generated by nitrogen link — do not edit.\n'
    '#include "$relativePath"\n';