How to use Emscripten?

2

I wanted to convert my C ++ code to JavaScript so I could use it in web pages. How can I do this? For what I researched Emscripten does this, but I do not know how to use it.

How does it work?

How to use it?

What are your capabilities?

How to integrate generated HTML in HTML?

    
asked by anonymous 16.08.2018 / 15:52

1 answer

1

The question is a bit broad, I will answer what it gives.

  

I wanted to convert my c ++ code to JavaScript so I could use it in web pages.

It's not that simple. Although it is possible to do this, if the code was not prepared to work in the * browser, or at least it is a library that is integrated in a code prepared for this, nor wasted time.

  

How can I do this? For what I researched Emscripten does this, but I do not know how to use it.

Saying how to do it is very broad, it would be a manual. I suggest you study a little WebAssembly , which eliminates the need for Emscripten and solves it in a much better way.

  

How does it work?

It is a compiler (or transpiler then it looks like script is called asm.js to run the generated code. The performance is pretty bad, unlike WebAssembly which is even used to improve JS performance.

  

How to use it?

With a more specific problem you may have to answer another question. But I do not know if you still want to learn something obsolete.

  

What are your capabilities?

I do not know what you mean.

  

How to integrate generated HTML in HTML?

Too broad to answer here.

    
16.08.2018 / 16:31