{"repo":"andrei-markeev/ts2c","free":true,"listed":false,"github":"https://github.com/andrei-markeev/ts2c","clone":"git clone https://github.com/andrei-markeev/ts2c.git","description":"Convert Javascript/TypeScript to C","language":"C","stars":1375,"topics":["typescript","c","transpiler","js","javascript"],"license":"ISC","category":"dev-tools","readme_excerpt":"JavaScript/TypeScript to C transpiler ===================================== Produces readable C89 code from JS/TS code. For example, this JavaScript: transpiles to the following C code: No excessive code that is not actually needed is ever generated. The output is as readable as possible and mostly maps well to the original code. Another example: transpiles to the following C code: Project status -------------- Work in progress: it works, but only about 70% of ES3 specification is currently supported: statements and expressions - 95%, built-in objects - 17%. Notable NOT supported features include, for example: float and big numbers (all numbers are int16 t currently), prototype , eval , Date , Math , etc. Detailed information about supported and planned features can be found in COVERAGE.md. Contributions are welcome! See src/README.md Live demo --------- You can try it out yourself online: - https://andrei-markeev.github.io/ts2c/ Rationale --------- The main motivation behind this project was to solve problem that IoT and wearables cannot be currently efficiently programmed with JavaScript. The thing is, for sustainable IoT devices that can work for a long time on single battery, things like Raspberry Pi won't do. You'll have to use low-power microcontrollers, which usually have very little memory available. RAM ranges literally from 512 bytes to 120KB, and ROM/Flash from 1KB to 4MB. In such conditions, even optimized JS interpreters like JerryScript, Espruino or V7 are somet","default_branch":null,"files":null,"tree":[],"storefront":"/r/andrei-markeev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/andrei-markeev/ts2c/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}