Great example of this; adobe released alchemy[1] a couple years back with which you could compile very basic c/c++ code to a "swic" library which could then be referenced in flash. Although initially free to try adobe wanted to turn this into a premium feature[2]. It was quickly reverse engineered and turned into a haxe api, that made the step of using basic c/c++ and compiling it to a swic obsolete, keeping everything nicely in the haxe ecosystem[3]. If that was not impressive enough they did the same thing with "pixelbender3d"[4] and created hxsl[5].
[1] http://labs.adobe.com/technologies/alchemy/ [2] http://blogs.adobe.com/flashplayer/2011/09/updates-from-the-... [3] http://ncannasse.fr/blog/virtual_memory_api [4] http://www.adobe.com/devnet/pixelbender.html [5] http://ncannasse.fr/blog/announcing_hxsl