# Publishing libraries in target languages

**URL:** https://community.haxe.org/t/publishing-libraries-in-target-languages/2490
**Category:** Haxe
**Created:** [May 31, 2020, 4:44am UTC](https://community.haxe.org/t/publishing-libraries-in-target-languages/2490 "2020-05-31T04:44:00Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![nobody123](https://avatars.discourse-cdn.com/v2/letter/n/b19c9b/32.png) [@nobody123](https://community.haxe.org/u/nobody123)
#### Post date: [July 19, 2020, 2:41am UTC](https://community.haxe.org/t/publishing-libraries-in-target-languages/2490/13 "2020-07-19T02:41:27Z")

</div>

> [@jedwards1211](#):
>
> Im tempted to start writing tools to transpile a carefully limited subset of either Java or TypeScript to source code for other common languages.

You might want to check out Ć (cito) first, it was designed for this use-case. Not as powerful as Haxe, but might be sufficient for the “carefully limited subset” you already had in mind …

> **[GitHub - fusionlanguage/fut: Fusion programming language. Transpiling to C,...](https://github.com/fusionlanguage/fut)**
>
> Fusion programming language. Transpiling to C, C++, C#, D, Java, JavaScript, Python, Swift, TypeScript and OpenCL C. - GitHub - fusionlanguage/fut: Fusion programming language. Transpiling to C, C+...

Incidentally, it seems like we have similar desires to use Haxe (or something) to make language-agnostic libraries. I wrote [this post](https://community.haxe.org/t/suitability-of-haxe-for-a-cross-platform-library-exporting-a-c-api/2556) recently (unaware of yours here). Absent special syntax to tell Haxe I want to export clean C entry points (and a single function for initializing the ‘runtime’), I’ve decided I’m not going to mess with trying to interface with hxcpp output, but instead am going to try the embedded HashLink approach. Based on what I’ve skimmed I think that’s going to be cleanest and the least effort.

But really the holy grail is something like what SWIG does for C++ - being able to export actual classes and instantiate them / call methods from other languages – essentially what COM tried to solve decades ago (and mostly failed, IMO). Ć/cito is even better than that, since there are no language boundaries to cross with the final output. But the language itself is unfortunately a bit primitive (probably of necessity given how many languages it’s _idiomatically_ targeting).

---

_[View the full topic](https://community.haxe.org/t/publishing-libraries-in-target-languages/2490)._
