Settings

Theme

Show HN: Ts-polyglot – Call C/C++ or Rust functions directly from TypeScript

ts-polyglot.dev

4 points by emykhailenko · 3 comments · 1 min read

Reader

Hi HN,

Experimenting with new Content Mappers feature in TypeScript 7.1 beta, and come up with one usefull idea:

Why don't we try to import C, C++, Rust files directly into TypeScript and call native functions without manually writing all the bindings?

Super simple and stupid implementation, but let's see how it goes.

Technically, something similar was already possible with Volar.js, but TypeScript 7.1 makes the integration much more straightforward.

1 thread
moishe_syzslak

Excellent work.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection