Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Write Swift Offline in the Browser – Swift Interpreter and WASM (swiftly.sh)
1 point by viewmodifier 72 days ago | hide | past | favorite | 3 comments


Shout out to SwiftFiddle: https://swiftfiddle.com

It's another project for writing Swift in the browser.


Yes there are a few but swiftly.sh is the only one that works offline in the browser!


Sharing the preview release that you can all try today at: https://swiftly.sh

Its entirely free and runs offline directly from your browser - you dont need Xcode and it works on any device (Mac, windows, chromebook etc).

I have lots of ideas for where we can take this from saving and sharing snippets to ota code updates in apps.

if you're curious how it works I wrote up a lil detail linked in the footer on the site.

TLDR - its a custom Swift Interpreter written in Swift and compiled to wasm - it works in 2 parts:

1. a "Compiler" that transforms Swift code to a custom intermediary format 2. a VM that can evaluate the intermediary format at runtime

Supports core features (functions, closures, control flow, optionals, collections, string interpolation) - more coming soon.

Would love feedback on what you’d do with it or features you’d want next.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: