On Sunday, April 9, 2017 at 3:36:11 PM UTC-7, Kenton Varda wrote:
>
> I don't think WASM is likely to be a good fit here, for two reasons:
>
> 1) libcapnp and libkj together add up to some 730k of code (text segment) 
> these days. Unless emscripten builds are significantly smaller, that's 
> probably too big. (If you stick to lite mode, it's still 401k, which is 
> still probably too big.)
>

For some use cases it might not matter.
 

>
> 2) The interface between JS and WASM would probably be very slow if every 
> accessor has to go through it. You'd probably end up wanting to translate 
> the whole capnp to a JSON object upfront, which of course defeats a lot of 
> the purpose.
>

I'm hoping shared memory 
<https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=javascript+shared+memory>
 
might be used, we could have serdes in wasm and access in JS, take with 
huge grain of salt :)
 

>
> So I definitely think a pure-JS implementation is still desirable.
>

Yea, definitely wouldn't hurt.

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to