While Haxe allows you to compile to pretty much everything using the same language, it doesn't use the same api for every target. Openfl[1], which is written in Haxe and allows you to use the flash api, compiles to pretty much anything using 1 codebase. "Papers, please" used openfl to achieve its portability so I guess it's a success story for openfl as well. Rhymdkapsel is another great game that uses it.