Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow scripting from JS #1

Closed
kripken opened this issue May 29, 2011 · 2 comments
Closed

Allow scripting from JS #1

kripken opened this issue May 29, 2011 · 2 comments

Comments

@kripken
Copy link
Owner

kripken commented May 29, 2011

Compiling code in C++ that uses bullet works fine, but using the compiled library directly from JS is very hard.

  1. Generating a JS API from the low-level LLVM constructs is hard.
  2. Not all the necessary stuff is even compiled - looks like the compiler decides not to compile classes etc. it doesn't need. Also, we have none of the enumerations and #define constants that are useful in C++ code.
  3. To use all LLVM optimizatons and DFE, we need a complete binary, not just a library, or else the optimizer will remove even more stuff we might want.

We need some new tools and ideas here. Or maybe we should just manually write the API in JS. This would give the best results, but take some initial effort.

@cjcliffe
Copy link

I'd vote for doing our own JS API -- I think it would ultimately produce a simpler and more JS-friendly interface.

@kripken
Copy link
Owner Author

kripken commented Aug 7, 2011

We now have autogenerated bindings using Emscripten and CppHeaderParser.

It might make sense to add another layer on top of that for something truly JS-friendly, but I have no idea what that would look like.

@kripken kripken closed this as completed Aug 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants