I wanted to know whether or not there is a way for me to write a library in Haxe and compile it to a library built for another platform. For example, if I wrote a library that was a Haxe implementation of some algorithm, could I compile that to a Java .jar, a Python library, a Javascript module, and .so/.dll shared libraries? It seems like that could be very useful, especially for people who want to develop SDK’s or libraries for interacting with a tool or platform for a collection of languages.
It’s definitely possible.
A few years ago I’ve created a library which simulated a battle system of a Clash-Of-Clans-like game, which was compiled as a shared library for a c++ clients on ios and android (with an attempt to integrate it as a js library + js vm), as a php library on server and as swf library for an as3 client.
Js, php and swf were pretty easy to implement. The most troubles were caused while implementing a shared c++ lib for different OSes and architectures.