EmscriptifierCambridge MA

  • 63 Commits
  • 28 Pushes
  • 22 Deploys
Launch Site

Emscriptifier

By ZECT

Screencast
Quick Intro

Use C++ directly in client side HTML and JavaScript to do advanced things like audio processing, OpenGL, etc.

Description

Emscriptifier sets up a client/server side interface to use C++ directly from HTML/JavaScript in web pages. C++ code is passed up to the server, and then sent to an external Emscripten translation server, where it's compiled into JavaSript. Once converted, the code is sent back to the client, and injected into the page.

Judging Instructions

Try out the demo!

What they Used

Emscripten, Polymer, Express, needle, Bootstrap, node.js, json5, an external Emscripten translation server

Who

Votes

Your Vote

Voting is now closed.

Other Votes

  • (38)
  • contestant
  • judge

    GoInstant

    A cool concept. Awesome to see it working. The security model of this is scary. The caching / checksum was a good idea. Definitely interesting.

  • judge

    Samsung

  • judge

    Adobe

    This site did not do what it said it would in Safari. :( Perhaps they could have used a simpler demo that didn't rely on the unreliable web audio api?

    • ZECTBynmo
      contestant

      Emscripten uses SDL, not Web Audio. I'm sorry that it didn't work for you, but I would love some insight on why that gives me 1 star. Did you not even try it in another browser?

  • contestant

    Square

    Interesting concept, and it seems to be working. Gonna have to knock some points off for the default bootstrap. I'm also not sure how good of an idea putting my code through foreign servers is.

    At any rate, good work guys.

  • judge

    Filter Squad

    Very cool idea and a neat way of getting started with Emscripten. I think it's interesting from the perspective of providing a way to test C++ code in the browser more than anything else (e.g. rather than using to implement unsupported stuff).

    Out of interest, is there a reason to use a custom element versus just using a custom type on a script tag? It seems odd to add a new tag entirely, but I may well be missing something there.

    Great work for the short amount of time, I'd love to see where this goes in the future.

    • ZECTBynmo
      contestant

      The custom tag allows me to at least attempt to pull down the converted javascript before the page has fully loaded, because I can override the html loading events. That was the main motivation

  • contestant

    Poptip

    I can see this as a tool people keep coming back to.

  • contestant

    Certainly neat to see it in action, but it doesn't really seem to do much beyond running https://github.com/kripken/emscripten on the server and returning/injecting the javascript client-side.

  • judge

    Screw ClojureScript.... CScript FTW! :)

  • contestant

    Mozilla

    Cool idea, and nice job getting it running in such a short time frame! We are using Emscripten on our team's project, so I'm definitely seeing the utility of this. Of course, for projects with multiple files or more complicated builds we would still need to manually invoke it, but it is cool to have a playground for it.

    Next step - compile Emscripten into JS so you can run the whole thing in the browser :)?

  • contestant

    Interesting approach but other than the demo, the website is not very useful -- you must download emscriptifier to use it.

    • ZECTBynmo
      contestant

      The website is a service. It acts as an interface to the translation server for the client side scripts which you can download. The server does quite a bit on this application, and I wish you would reconsider your vote.

      You must download Emscriptifier because otherwise you'd have to write the code to make translation requests to the server manually.

  • judge

    Freelancer

    • ZECTBynmo
      contestant

      Any feedback to go with the low votes?

    • pgte
      judge

      Interesting and cool experiment, but not very useful IMO. Relies on remote central service making it more vulnerable to code injection and latency. This is basically an emscripten compile server and a code injector. As I said, interesting experiment, but I'd like to see a 100% client thing... :).

    • ZECTBynmo
      contestant

      Yes a client side Emscripten is definitely the next step. This is just a demo of the whole idea. Anyway, thanks for checking it out!

  • contestant
  • contestant

    Condé Nast

    Cool project. Hope to see this combined with https://github.com/jesusabdullah/browserify-cdn to require C++ in the browser. That'd be so awesome!

  • contestant

    The idea of using C++ in a web page sounds quite weird to me (using C to write webgl shaders is something I can definitely understand: you can do stuff that you would never do in javacript). But that's what I like the most about your project: discovering that some people actually do crazy stuff like this is quite refreshing!!

  • judge

    Applied Geographics

    next up I want rust :)

  • contestant

    Ok. This is a really cool idea, but the use of a server for compilation completely kills any possible use of this. Compiling on an external machine is essentially open season for a corrupt entity to inject all sorts of functionality.

    I think if you attacked this by forking FireFox and adding in Emscripten, then this could be cool.

    • ZECTBynmo
      contestant

      I would say that this is more of a demo of the concept of the direct integration of C++. I agree that getting a client side Emscripten is the next step, but that was too much for the weekend. The 1's are harsh, but hey, thanks for checking it out!

    • JeremyRubin
      contestant

      Ok, I see how its ok for the purpose of demo -- maybe I was a bit harsh, but I would say that client siding should be the #1 priority if you keep on working on this.

    • ZECTBynmo
      contestant

      :)

      I definitely agree. Clang has already been ported to js, so it should be possible https://github.com/kripken/clangor

      Thanks again for checking out the project

  • contestant

    IOKI

    As a javascript developer myself I can see situations where a tool like this could be useful, still I think it would be better on the server as a npm module maybe?

    • ZECTBynmo
      contestant

      It's really great for audio processing at the very least. It's much much easier to do cross browser DSP this way than using HTML5 audio right now, or at least I think so.

IMPORTANT DATES

REGISTRATION
SEP 17
COMPETITION
NOV 9-11 UTC
JUDGING
NOV 11-17
WINNERS
NOV 18

Thank you to our Platinum Sponsors