This example demonstrates how to export Swift functions to JavaScript.
-
Build the project:
swift package --swift-sdk $SWIFT_SDK_ID js --use-cdn -
Serve the files:
npx serve
Then open your browser to http://localhost:3000.
GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JavaScriptKit/Examples/ExportSwift at main · cuberoot/JavaScriptKit |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |