Build a .wasm Class using WebAssembly

There is a good description here for building a wasm using HAXE and WebAssembly

https://groups.google.com/forum/#!topic/haxelang/Pcm38LPFjW0

I want a class file similar to the one at this example on Github ( which does not use HAXE )

Anyone?

The problem is how to use the WebAssembly (Emscripten) ‘Embind’ to pass the variables.
Or how to make a public function with HAXE but not have it as a class, maybe.
If someone could steer me to some documentation on this topic I would greatly appreciate it.

Hey, i tried do find a way to do it few month ago but i failed.

I hope you’ll have more success

Come to think, it may not be practical for HAXE to use a C++ class since issues such as memory management would require knowing how the class is used.

See there: Embind — Emscripten 3.1.52-git (dev) documentation

It’s fine to expose a C++ class instance to JS as long as the JS side explicitly calls obj.delete() once it’s done with it.