EDIT November 2017: recently the target wasm32-unknown-unknown
was added to rustc
which uses the LLVM WASM backend and works without Emscripten. This is now the recommended way of generating WASM code from Rust (as it is much easier). Thus, this gist document is pretty much useless now. A great resource on getting started with WASM and Rust is hellorust.com: Setup and Minimal Example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import AVFoundation | |
import Photos | |
import MobileCoreServices | |
class ViewController: UIViewController { | |
override func viewDidAppear(_ animated: Bool) { | |
super.viewDidAppear(animated) | |
startVideoToGIFProcess() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const statusCodes = require('http').STATUS_CODES; | |
function createError(code, name) { | |
return function(message) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = name; | |
this.message = message; | |
this.statusCode = code; | |
} |