Excellent work.
thanks ;)
Open ts-polyglot.devts-polyglot.dev
Import C, C++, and Rust functions directly into TypeScript with real types, using TypeScript 7.1's Content Mappers feature.
Visit projectShow HN@emykhailenkoOct 23, 2026
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.
Community
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.
Community
Excellent work.
thanks ;)