All Projects → BenchR267 → Get Schwifty

BenchR267 / Get Schwifty

Licence: apache-2.0
Get Schwifty is a self-hosted Swift transpiler and was originally build for my WWDC scholarship application.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Get Schwifty

Swiftuitodo
An example to-do list app using SwiftUI which is introduced in WWDC19
Stars: ✭ 585 (+557.3%)
Mutual labels:  wwdc
Prolog Target Js
Simple Prolog to JS transpiler
Stars: ✭ 19 (-78.65%)
Mutual labels:  transpiler
San Jose
Custom Xcode theme inspired by Apple's WWDC 2017
Stars: ✭ 43 (-51.69%)
Mutual labels:  wwdc
Pseudo
transpile algorithms/libs to idiomatic JS, Go, C#, Ruby
Stars: ✭ 654 (+634.83%)
Mutual labels:  transpiler
Typescripttolua
Typescript to lua transpiler. https://typescripttolua.github.io/
Stars: ✭ 783 (+779.78%)
Mutual labels:  transpiler
Wwdc20playground
WWDC20 Swift Student Challenge Winner (Actually a WWDC 19 project but reworked & rebranded)
Stars: ✭ 27 (-69.66%)
Mutual labels:  wwdc
Asciiwwdc.com
Searchable full-text transcripts of WWDC sessions
Stars: ✭ 542 (+508.99%)
Mutual labels:  wwdc
Jsweet
A Java to JavaScript transpiler.
Stars: ✭ 1,167 (+1211.24%)
Mutual labels:  transpiler
Pas2dart
Object Pascal (Free Pascal 3, Delphi 2007) to Dart (2.5) transpiler
Stars: ✭ 16 (-82.02%)
Mutual labels:  transpiler
Ios
https://wwdc.family the iOS app
Stars: ✭ 38 (-57.3%)
Mutual labels:  wwdc
Awesome Swift Korean Lecture
훌륭한 Swift 세션 동영상(강좌), 한글 자막있는 혹은 한국어 강의 정보 링크 모음 (Awesome Swift Korean lecture information)
Stars: ✭ 649 (+629.21%)
Mutual labels:  wwdc
J2cl
Java to Closure JavaScript transpiler
Stars: ✭ 773 (+768.54%)
Mutual labels:  transpiler
Ts2c
Convert Javascript/TypeScript to C
Stars: ✭ 878 (+886.52%)
Mutual labels:  transpiler
About Swiftui
Gathering all info published, both by Apple and by others, about new framework SwiftUI.
Stars: ✭ 5,954 (+6589.89%)
Mutual labels:  wwdc
Wwdc
The unofficial WWDC app for macOS
Stars: ✭ 8,137 (+9042.7%)
Mutual labels:  wwdc
Rapydscript
Python-inspired, decluttered JavaScript
Stars: ✭ 560 (+529.21%)
Mutual labels:  transpiler
Lazygrid
SwiftUI sample using LazyVGrid
Stars: ✭ 24 (-73.03%)
Mutual labels:  wwdc
Cessie
Transpile your CSS bundle to support CSS variables, calc, and future CSS for legacy browsers.
Stars: ✭ 81 (-8.99%)
Mutual labels:  transpiler
Elchemy
Write Elixir code using statically-typed Elm-like syntax (compatible with Elm tooling)
Stars: ✭ 1,080 (+1113.48%)
Mutual labels:  transpiler
Qooxdoo Compiler
Compiler for Qooxdoo, 100% javascript
Stars: ✭ 32 (-64.04%)
Mutual labels:  transpiler

Get Schwifty \o/ Build Status

Get Schwifty is an app to run Swift on your iOS device. I created this project as an application for a scholarship to Apples WWDC 2017. Get Schwifty is also available on the App Store.

It is using a lexer to power syntax highlighting, a parser, abstract syntax tree to get semantic information about the source code.

If the code does not contain any errors or unimplemented features a generator is used to generate JavaScript code that is eventually evaluated in JavaScriptCore.

The project was created during my application for a scholarship at WWDC 17.

Demo

How does that work?!

It's much less magic as it seems in the first moment. I wrote a lexer which creates tokens out of the given source code. This output is also used to create syntax highlighting within a standard UITextView. The tokens are also used by a parser which creates semantic information via an abstract syntax tree. The real magic happens with that semantic information. Since it's not possible to run compiled binaries on iOS within an app context I generate Javascript code out of the syntax tree. JavaScriptCore is a framework which is used to execute the generated code. I created handlers for calls to print and alert to be able to get some output.

What features are implemented?

The project currently supports the following language features:

  • var, let, func declarations
  • if, else if and else control structures
  • while loops
  • simple calculation and conditional expressions
  • function calls (currently without external parameters)
  • recursive function calls
  • simple type system

What features are missing?

The list of missing features is too long for this page, so I will only name one of the most important ones:

  • classes, structs and other complex types
  • methods
  • generics
  • higher order functions
  • framework bindings

How can I get it?

The easiest way to get 'Get Schwifty' is by installing it from the App Store. If you would like to test the latest version of the app, send me a message on Twitter (@benchr) and I'll add you to Testflight if there are enough free slots.

What about the license?

Currently I don't want to decide where the project is heading to, so I didn't add a license file. Feel free to clone the project, run it on your device and send contributions. I will add the license later when I decided about it.

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].