Home Community Blog Buy Now

Misty Community Forum

WebAssembly support?

Does the JavaScript runtime in Misty robots support WebAssembly ? If not, is it something that would be difficult to support eventually?

or asm.js ?

As some motivation, I am exploring how:

  1. to support more programming languages than JavaScript (JS) and C#.
  2. to make Misty JS skill development tools better.

Regarding goal 1, developing with C#, though powerful, is not accessible because it requires Visual Studio running on a Windows host. If the JS runtime on Misty robots supports WebAssembly or asm.js, then we can compile from C, C++, or Rust using a tool like Emscripten.

Hi Scott,

I asked around and right now the best answer I can give is, “We’re not sure”. Its an interesting idea, but no one here has ever dug into this. Someone thought that perhaps the lack of a DOM might prevent this from working.

1 Like

Thanks for your response. I will explore this and collect my notes here.

Also, it might be possible to write Misty skills in Dart and then export to JavaScript using dart2js. This does not have the constraints of asm.js.

Have you tried Visual Studio Online? Trying to get other languages translated into JS feels like a horrible idea…

Given revelations in a recent topic on this forum, I am not going to pursue this direction.

For what it is worth,

  • DOM is not required for WebAssembly.
  • Even without support for WebAssembly, this work is feasible because we can convert wasm to JS using binaryen. For example, a pipeline that I expect to be feasible on Misty robots is Rust -> WebAssembly -> JS.
  • Translating other languages into JS is not a horrible idea when there is legacy infrastructure. For example, old Web browsers that do not support modern JS have to be supported via transpiling with a tool like Babel.