Skip to content

Instantly share code, notes, and snippets.

View leeola's full-sized avatar

Lee Olayvar leeola

View GitHub Profile

Build Rust with Emscripten support

For more up2date information: http://www.hellorust.com/emscripten/

Emscripten is the LLVM-based project to compile stuff into JavaScript. Luckily, Rust already uses LLVM and just recently got an upgrade to the used version of LLVM. Now emscripten uses a fork of LLVM, which is on the way to use more or less the same base LLVM as Rust. See the next-merge branch.

Simple 13 step recipe to build Rust with Emscripten support

# using VirtualBox version $VBOX_VERSION
FROM boot2docker/boot2docker
RUN apt-get install p7zip-full
RUN mkdir -p /vboxguest && \
cd /vboxguest && \
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \
sh VBoxLinuxAdditions.run --noexec --target . && \
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.