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

Import functions from C, C++ and Rust source files straight into TypeScript, with real types.
2 points by emykhailenko 6 hours ago ts-polyglot.dev 1 comments
Summary not yet generated for this article.

Original Text

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.

Comments (1 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open