Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Prints elements of an array to console.
# swift/demo/array.swift
import JavaScriptKit
let console = JSObject.global.console
let arr = [1, 2, 3, 4, 5]
for num in arr {
console.log!(num)
}SwiftWasm is a toolchain and ecosystem that compiles Swift code into WebAssembly, allowing developers to run Swift applications directly in the browser, WASI runtimes, serverless platforms, and edge environments. It brings Swift’s safety, performance, and modern language features to WebAssembly-based execution environments.
Origin & Creator
SwiftWasm originated as an open-source community project led by Max Desiatov and contributors around 2019, expanding the Swift compiler to support WebAssembly targets.
Industrial Note
SwiftWasm is gaining traction for Swift-based web UIs, full-stack Swift apps, serverless Wasm microservices, and Apple ecosystem developers who want to run Swift outside Apple hardware.