Protocol generator based on Haxe