← Back to context

Comment by DonHopkins

2 years ago

Thank you!

What I meant wasn't Moonbit targeting JavaScript, but integrating Moonbit compiled into WebAssembly with JavaScript, making it so they can call back and forth to each other more easily, like Embind wraps C++ classes, methods, and functions with glue so they are exposed and callable as JavaScript classes, methods, and functions.

Kind of like what SWIG or Boost.Python (which inspired Embind) does, too.

The plumbing for integrating JavaScript and WebAssembly is evolving (especially with respect to passing objects and garbage collection).