All Projects → swiftwasm → Swiftwasm Pad

swiftwasm / Swiftwasm Pad

Licence: mit
swiftwasm-pad is a online playground to help developers learn about Swift on Web.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftwasm Pad

Go Playground
Better Go Playground powered by React and Monaco editor
Stars: ✭ 354 (+911.43%)
Mutual labels:  playground
Whats New In Swift 5 0
An Xcode playground that demonstrates the new features introduced in Swift 5.0.
Stars: ✭ 703 (+1908.57%)
Mutual labels:  playground
Awesome Ai Books
Some awesome AI related books and pdfs for learning and downloading, also apply some playground models for learning
Stars: ✭ 855 (+2342.86%)
Mutual labels:  playground
Inim
Interactive Nim Shell / REPL / Playground
Stars: ✭ 407 (+1062.86%)
Mutual labels:  playground
Unityplayground
A collection of simple scripts to create 2D physics game, intended for giving workshops to a young audience
Stars: ✭ 603 (+1622.86%)
Mutual labels:  playground
Ngx Formly Playground
Project with list of Angular Formly exercises. Every next exercise add new feature to the previous one.
Stars: ✭ 16 (-54.29%)
Mutual labels:  playground
Awesome Swift Playgrounds
A List of Awesome Swift Playgrounds
Stars: ✭ 3,521 (+9960%)
Mutual labels:  playground
Scrubber
🎚Swift playground for building animations with UIViewPropertyAnimator
Stars: ✭ 32 (-8.57%)
Mutual labels:  playground
Flutterbasicwidgets
ABC of Flutter widgets. Intended for super beginners at Flutter. Play with 35+ examples in DartPad directly and get familiar with various basic widgets in Flutter
Stars: ✭ 609 (+1640%)
Mutual labels:  playground
Vuep
🎡 A component for rendering Vue components with live editor and preview.
Stars: ✭ 840 (+2300%)
Mutual labels:  playground
Playalways
Create Xcode playgrounds from your menu bar
Stars: ✭ 515 (+1371.43%)
Mutual labels:  playground
Graphql Editor
📺 Visual Editor & GraphQL IDE. Draw GraphQL schemas using visual 🔷 nodes and explore GraphQL API with beautiful UI. Even 🐒 can do that!
Stars: ✭ 5,485 (+15571.43%)
Mutual labels:  playground
Deer Executor
An executor for online judge —— 基于Go语言实现的代码评测工具
Stars: ✭ 23 (-34.29%)
Mutual labels:  playground
Playground
Instantly create Swift playgrounds from the command line
Stars: ✭ 391 (+1017.14%)
Mutual labels:  playground
Flutterplayground
Playground app for Flutter
Stars: ✭ 859 (+2354.29%)
Mutual labels:  playground
Luaviewsdk
A cross-platform framework to build native, dynamic and swift user interface - 强大轻巧灵活的客户端动态化解决方案
Stars: ✭ 3,586 (+10145.71%)
Mutual labels:  playground
Flexibleimage
A simple way to play with the image!
Stars: ✭ 798 (+2180%)
Mutual labels:  playground
Mlmoji
Hand-Drawn Emoji Classifier (WWDC18 Scholarship Application)
Stars: ✭ 34 (-2.86%)
Mutual labels:  playground
Revery Playground
Live, interactive playground for Revery examples
Stars: ✭ 14 (-60%)
Mutual labels:  playground
Electron Playground
This is a project to quickly experiment and learn electron related APIs
Stars: ✭ 938 (+2580%)
Mutual labels:  playground

swiftwasm-pad

Build and deploy

swiftwasm-pad is a online playground to help developers learn about Swift on Web.

https://swiftwasm-pad.netlify.app

Run

Using docker-compose

$ docker-compose up

Manual start up

# Build PreviewSystem
$ ./PreviewSystem/build-script.sh

# Start frontend
$ cd Frontend
$ npm install
$ npm run start

# Start backend
$ cd CompileAPI
$ export LOCAL_LAMBDA_SERVER_ENABLED=true
$ export LAMBDA_PREVIEW_STUB_PACKAGE=$(pwd)/../PreviewSystem/distribution/PreviewStub
$ export LAMBDA_SWIFTC=$(dirname $(pwd))/.toolchain/darwin/$(cat ../.swift-version)/usr/bin/swiftc
$ swift run CompileSwiftWasm

CompileAPI

CompileAPI is deployed with SwiftWasm toolchain built on Amazon Linux 2 and PreviewSystem. .swiftmodule files in PreviewSystem are used to compile user input code that can use Tokamak or JavaScriptKit. This API returns not an executable wasm binary but an object file. The object file will be linked with prebuilt library on browser.

Frontend

Frontend web application sends requests to CompilerAPI, link compiled object files and shared library and run linked executable wasm. library.so.wasm is the shared library combined with Swift Standard Library, Tokamak and JavaScriptKit. The library is built by ./PreviewSystem/build-script.sh This frontend application uses WebAssembly linker implemented by Swift named chibi-link to reduce CompileAPI's load and also reduce transfer data size. The linker is executed in Web Worker to avoid blocking UI.

Related Projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].