This product was not featured by Product Hunt yet. It will not be visible on their landing page and won't be ranked (cannot win product of the day regardless of upvotes).
I've been following the development of TypeScript Content Mappers for quite a while, especially because it overlaps with another TypeScript extension project I'm working on, where I rely pretty heavily on Volar.js and God, it's a lot of code to keep all the language features working and in sync with TypeScript.
But now we finally have an official extension mechanism built directly into TypeScript, and now we can literally import anything.
I immediately started thinking about what else we could do with it. One thing that's been a particular pain for me is C++ lib interaction.
I'm building a small inference engine, and one of the biggest headaches has been N-API. Every time I need to call a C++ function from Node.js, I have to wrap it in special N-API bindings. It works, but it's a pain. There's also Koffi, which is pretty interesting, but it still doesn't give me the seamless type inference, IntelliSense, and development experience I'm looking for.
So I thought, why not take this a step further? What if we could just import C, C++, or Rust functions directly into TypeScript, as naturally as importing another TS file?
Using Content Mappers you can import functions from C, C++, and Rust source files directly into TypeScript, with inferred types and IntelliSense support, while generating and compiling the native bindings behind the scenes.
It's still early, and there's plenty of work ahead, but I think this opens up some really interesting possibilities.
Would love to hear your thoughts, especially from anyone who's worked with TypeScript language tooling, N-API, or native interoperability.
No comment highlights available yet. Please check back later!
About ts-polyglot on Product Hunt
“C, C++ and Rust functions in TypeScript”
ts-polyglot was submitted on Product Hunt and earned 6 upvotes and 1 comments, placing #45 on the daily leaderboard. Import functions from C, C++ and Rust source files straight into TypeScript, with real types.
ts-polyglot was featured in Open Source (69k followers), Software Engineering (43.2k followers) and GitHub (41.5k followers) on Product Hunt. Together, these topics include over 59.5k products, making this a competitive space to launch in.
Who hunted ts-polyglot?
ts-polyglot was hunted by Evgen Mykhailenko. A “hunter” on Product Hunt is the community member who submits a product to the platform — uploading the images, the link, and tagging the makers behind it. Hunters typically write the first comment explaining why a product is worth attention, and their followers are notified the moment they post. Around 79% of featured launches on Product Hunt are self-hunted by their makers, but a well-known hunter still acts as a signal of quality to the rest of the community. See the full all-time top hunters leaderboard to discover who is shaping the Product Hunt ecosystem.
Want to see how ts-polyglot stacked up against nearby launches in real time? Check out the live launch dashboard for upvote speed charts, proximity comparisons, and more analytics.
Hi all,
I've been following the development of TypeScript Content Mappers for quite a while, especially because it overlaps with another TypeScript extension project I'm working on, where I rely pretty heavily on Volar.js and God, it's a lot of code to keep all the language features working and in sync with TypeScript.
But now we finally have an official extension mechanism built directly into TypeScript, and now we can literally import anything.
I immediately started thinking about what else we could do with it. One thing that's been a particular pain for me is C++ lib interaction.
I'm building a small inference engine, and one of the biggest headaches has been N-API. Every time I need to call a C++ function from Node.js, I have to wrap it in special N-API bindings. It works, but it's a pain. There's also Koffi, which is pretty interesting, but it still doesn't give me the seamless type inference, IntelliSense, and development experience I'm looking for.
So I thought, why not take this a step further? What if we could just import C, C++, or Rust functions directly into TypeScript, as naturally as importing another TS file?
Well, here we are:
https://github.com/mykhailen/ts-polyglot
Using Content Mappers you can import functions from C, C++, and Rust source files directly into TypeScript, with inferred types and IntelliSense support, while generating and compiling the native bindings behind the scenes.
It's still early, and there's plenty of work ahead, but I think this opens up some really interesting possibilities.
Would love to hear your thoughts, especially from anyone who's worked with TypeScript language tooling, N-API, or native interoperability.