I am working on an iOS project where I need to integrate a WebAssembly (Wasm) module using the Wasmer runtime. I have successfully compiled my code into a .wasm file, but I am struggling with packaging this Wasm module with Wasmer and making calls to the functions within the Wasm from my Swift code. The original WASM was built in Rust.
Here are the main issues I need help with:
Packaging the Wasm module with Wasmer:
How do I build Wasmer as a static library suitable for iOS?
What steps are required to include the Wasmer static library in my Xcode project?
Making function calls to the Wasm module from Swift:
How do I load the .wasm file in my Swift code using Wasmer?
How do I call functions defined in the Wasm module and handle their outputs in Swift?
I have tried using iOS’s internal JavascriptCore framework, but it doesn’t seem to work.