Home to haskell-swift interoperability libraries and tools
-
hxs: a build-tool to setup and build an xcode project that links against a Haskell library as explained in the first part of the guide
- Usage instructions coming soon
- Currently missing automatically adding as dependencies the to-be
haskell-swift
Haskell library andswift-haskell
Swift package (As these libraries are not yet complete) - Preliminary bleeding edge installation instructions:
# After cloning the repo cd haskell-swift/hxs cabal install # Create a new empty XCode project in a new directory, and run inside it: hxs init hxs build # Open XCode: in `ContentView.swift` and you should be able to import NameOfAppHS.MyForeignLib # and call hs_factorial Text("Factorial: \(hs_factorial(3))")
- As I've said, this is still missing all the
@ForeingImportHaskell
,$(foreignExportSwift ...)
niceties from the libraries that are WIP.
-
swift-ffi: a Haskell library with Swift foreign function interface utilities (Template Haskell) for exporting Haskell functions to call from Swift
-
haskell-ffi: a Swift package with Haskell foreign function interface utilities (using Swift 5.9 Macros) for importing Haskell functions to call from Swift