If you want to implement some C APIs in JS, the simplest thing is a JS
library (--js-library, which is how all the C APIs like libc, sdl etc. are
implemented). That is as low-overhead as possible. The existing SDL
implementation is one example of this, see also the test for --js-library
(grep for that in the test suite).

- Alon



On Mon, Feb 17, 2014 at 2:25 PM, Mark Hahn <[email protected]> wrote:

> I'm a newbie planning on implementing a subset of GDI in javascript that
> is called from emscripten-converted C (not C++) to draw text on a canvas.
> I'm looking into using embind because I don't think I can avoid
> double-quotes in my javascript (I always code in coffeescript).
>
> Some embind questions ...
>
> 1) Will I have trouble interfacing with embind from C? I see most of the
> embind docs in the wiki relate to C++ classes.
>
> 2) The wiki page mentions that embind is "not as lightweight as JS
> libraries". How large is embind (bytes added to page load)?
>
> 3) I'm going to be calling several javascript functions from C for every
> keystroke in an editor. There can't be more than 50 ms or so delay in the
> browser including the canvas drawing time. Is embind to slow for this?
> Anyone have an idea what the call overhead is in milliseconds?
>
> Can anyone suggest a better way to have C calls draw on a canvas than
> coding the calls myself in javascript? I've looked at SDL and OpenGL and
> both seem like overkill. I was disappointed to find there wasn't already a
> GDI emulation in emscripten.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to