[rust-dev] enscripten demo?

Mohd. Bilal Husain bilal at bilalhusain.com
Wed Apr 4 02:55:27 PDT 2012

Passed a dumb sample rust bitcode to emscripten, got js functions#.
Realized I need to run on core modules too for printing simple hello world.
Took io from libcore, decimated code to avoid few build errors, emcc throws

    Unclear type in struct

Anyways, need to figure out how to build native modules and core lib, std
lib; and how to map these modules to imports in a sample hello-world.

Can use some help and pointers about strategy.


On 3 April 2012 23:41, mbrubeck <mbrubeck at mozilla.com> wrote:

> On 04/03/2012 09:59 AM, Mohd. Bilal Husain wrote:
>> I was wondering that with all llvm bindings, it should be straightforward
>> to run emscripten on Rust's IR generated for LLVM. And indeed there seems
>> to be working pieces.* What I want to know is whether there's an online
>> demo or compiled javascript which I can play with?
> Here's what I got several months ago when I ran a simple Rust file through
> Emscripten, just out of curiousity.  It doesn't run because of missing
> functions like isPointerType:
> http://limpet.net/mbrubeck/**temp/emscripted.js<http://limpet.net/mbrubeck/temp/emscripted.js>
> (Obviously I never tried running the original Rust code either, since I
> later noticed it has an infinite loop bug.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120404/0793d515/attachment.html>

More information about the Rust-dev mailing list