3 ms·
Show HN: Swift Interpreter and WASM - Write and Run Swift in Browser
- viewmodifier 1y agoSharing the preview release that you can all try today at: https://swiftly.sh 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.