Skip to content

fix: declare MLXFast as KokoroSwift target dependency#36

Open
rodexyh wants to merge 1 commit into
mlalma:mainfrom
rodexyh:fix/mlxfast-dep
Open

fix: declare MLXFast as KokoroSwift target dependency#36
rodexyh wants to merge 1 commit into
mlalma:mainfrom
rodexyh:fix/mlxfast-dep

Conversation

@rodexyh

@rodexyh rodexyh commented May 11, 2026

Copy link
Copy Markdown

`BuildingBlocks/LayerNormInference.swift` imports `MLXFast` and calls `MLXFast.layerNorm(weight:bias:eps:)`, but `Package.swift` never declares `MLXFast` as a target dependency.

`swift build` on macOS appears to resolve via transitive caching (1.0.11 builds clean for me), but Xcode iOS device builds fail at module resolution:

```
error: No such module 'MLXFast'
import MLXFast
^
```

This affects every tagged release (1.0.10, 1.0.11) and `main`.

Fix

Add one product reference to the KokoroSwift target dependencies:

```swift
.product(name: "MLXFast", package: "mlx-swift"),
```

`MLXFast` already lives in the `mlx-swift` package that's pulled in here — this just exposes it to imports.

Test plan

  • `swift build` on macOS: clean (already worked)
  • Xcode iOS device build: previously failed with `No such module 'MLXFast'`, now resolves

Thanks for the great library — found this while integrating KokoroSwift into a vocab learning iOS app. Happy to add a regression test if you'd like.

BuildingBlocks/LayerNormInference.swift imports MLXFast and calls
MLXFast.layerNorm(...), but Package.swift never declares MLXFast as a
target dependency. macOS `swift build` can resolve via transitive caching;
Xcode iOS device builds fail at module resolution:

    error: No such module 'MLXFast'
    import MLXFast
           ^

Add MLXFast to the KokoroSwift target's dependencies (the package is
already pulled in via mlx-swift, this just exposes it to imports).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant