开发者

Translating C to JavaScript [closed]

开发者 https://www.devze.com 2023-01-25 09:56 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

开发者_运维技巧 Improve this question

I've got a bunch of math/dsp algorithms in C. Single functions, one function per file, no fancy linking or includes or preprocessor directives, only c99 and standard library calls (mainly memset and memmoves to handle array copying etc). Translating them is not a big problem, but it takes time. I was wondering if there was some C -> Javascript translation tool, in order to speed up the work.

Please mind I don't need a perfect translation, I will put my hand on the final result anyway. What I need is a simple tool that helps with the basic, "boring" things.

Anyone heard of such a thing?

Edit: seems that emscripten will do the trick.


Update: it seems The Times They Are a-Changin' :)

See this article: DOOM Ported to JavaScript and HTML5

Zakai compiled the DOOM source code from C to JavaScript using Emscripten and Clang and optimized it with Closure Compiler.

And here is the Project page. Have fun! :)


FYI, Emscripten does exactly that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号