Won't you need people to define C structures in JS for this to work? Sounds like it will need to handle alignment issues too, unless the user is responsible? We have code for that in Runtime which can help.
- Alon On Wed, Mar 5, 2014 at 4:16 PM, Mark Hahn <[email protected]> wrote: > I forgot to mention that it is useful for more than debugging. Javascript > functions can convert struct pointers in arguments to objects and can write > objects into the heap as structs. > > > On Wed, Mar 5, 2014 at 2:02 PM, Mark Hahn <[email protected]> wrote: > >> Check out https://github.com/mark-hahn/emStructObj. >> >> This is a set of javascript functions to convert between C/C++ structs >> and JS objects (both ways) in emscripten converted code. It can be used >> for debug print statements or for inspecting structs in the browser js >> console. It is 100% javascript and no C code is needed. >> >> This has barely begun and is useless for now but will have an alpha >> version in a day or two. I'm announcing it now for two reasons. One is to >> get feedback and ideas and the second reason is to find out if this already >> exists in some form. I will reply to this post when it is ready to try. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "emscripten-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/emscripten-discuss/Ux468UD2YWU/unsubscribe >> . >> To unsubscribe from this group and all its topics, 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. > -- 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.
