livecodes icon indicating copy to clipboard operation
livecodes copied to clipboard

Feature: Swift WASM

Open aehlke opened this issue 2 years ago • 3 comments

Type of feature

✨ Feature

Current behavior

No response

Suggested feature

I'm not sure what it would take to run on top of your existing WASM support, but direct support for SwiftWASM would be great.

Additional context

https://book.swiftwasm.org

https://pad.swiftwasm.org

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Contributing Docs

  • [x] I agree to follow this project's Contribution Docs

aehlke avatar Jun 02 '23 19:06 aehlke

@aehlke

thanks for the suggestion.

SwiftWasm compiles swift code to wasm to run in the browser (and other wasm runtimes). However the compiler itself is not running on wasm. (installation)

The playground (https://pad.swiftwasm.org/) sends code to the server to be compiled to wasm which is then sent back to the browser.

LiveCodes, being a client-side app, needs the compiler itself to run on wasm or JavaScript (to compile the code in the browser).

It is highly appreciated, if somebody can guide us to a project that can do that.

Thanks again

hatemhosny avatar Jun 02 '23 20:06 hatemhosny

Thank you for looking - of course you're right, it says it right there, oops

I'd love to use Swift Package Manager-packaged repos as WASM in livecodes as imports, even if I can't write in Swift in livecodes. Is it possible to make it easier to import SPM packages that are Swift that work with WASM? I can investigate resources for you.

aehlke avatar Jun 05 '23 23:06 aehlke

I found a great article with resources at end https://www.fermyon.com/wasm-languages/swift

aehlke avatar Jun 06 '23 17:06 aehlke