# andrei-markeev/ts2c

Convert Javascript/TypeScript to C

Repository: https://github.com/andrei-markeev/ts2c
Canonical: https://ross.abutalabs.com/products/ts2c
Language: C
License: ISC
License Family: permissive
Topics: typescript, c, transpiler, js, javascript
Last push: 2025-11-21T21:54:47+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 53, release rhythm 35, longevity 100
- inputs: {"age_days": 3692, "days_push": 285, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1377, forks 94 (observed 2026-08-28T04:04:33.373537+00:00)

## What it is
A transpiler that converts JavaScript/TypeScript source code into readable C89 code. It was created to let developers program low-power IoT microcontrollers and wearables in JavaScript without the overhead of an embedded JS interpreter.

## Use cases
- convert javascript code to c
- transpile typescript to c for embedded devices
- run js logic on microcontrollers without an interpreter
- port a small javascript library to c
- program esp32 or wearables using typescript
- generate readable c code from js snippets

## When to choose
- you need to run simple JS/TS logic on memory-constrained microcontrollers
- you want readable, minimal C output that maps closely to your source
- your code sticks to the supported ES3 subset (no floats, eval, Date, Math, prototypes)

## When to avoid
- you need modern JavaScript features like prototypes, eval, Date, or Math
- your code relies on floating-point or big numbers
- you need a production-grade, fully spec-compliant transpiler

## Facets
- artifact type: cli-tool
- maturity: experimental
- function: compiler, developer-tools
- domain: compilers, programming-languages, embedded-systems, iot
- platform: cross-platform, cli
- tags: transpiler, typescript, javascript, c89, microcontrollers, esp32

## Member repositories
- andrei-markeev/ts2c (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:33.373537+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:25.344960+00:00, confidence not recorded.
  - readme: https://github.com/andrei-markeev/ts2c (fetched 2026-08-28T04:04:33.373537+00:00, sha d14ff13eff1d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
