swiftwasm / JavaScriptKit

Swift framework to interact with JavaScript through WebAssembly.
https://swiftpackageindex.com/swiftwasm/JavaScriptKit/main/documentation/javascriptkit
MIT License
650 stars 43 forks source link

JavaScriptKit as a "system" library? #61

Open MaxDesiatov opened 3 years ago

MaxDesiatov commented 3 years ago

It would be great if we could provide shims for Dispatch and Foundation APIs that rely on JS hosts directly instead of WASI. The problem is that Dispatch and Foundation are "system" modules shipped with the SwiftWasm SDK, while JavaScriptKit is consumed by users via SwiftPM.

I wonder if we could consider promoting JavaScriptKit to a "system" library, I guess Swift for Tensorflow does a similar thing with PythonKit already. This will obviously require our API to become much more stable, but I hope it would be worth it.

WDYT?

kateinoigakukun commented 3 years ago

I think that would be a good option. However, I think it's too early to ship this in the toolchain due to compatibility issues.