haxe - Man Page

manual page for haxe 4.0.5


haxe <target> [options] [hxml files...]


Haxe Compiler 4.0.5 - (C)2005-2019 Haxe Foundation


--js <file>

compile code to JavaScript file

--lua <file>

compile code to Lua file

--swf <file>

compile code to Flash SWF file

--as3 <directory>

generate AS3 code into target directory

--neko <file>

compile code to Neko Binary

--php <directory>

generate PHP code into target directory

--cpp <directory>

generate C++ code into target directory

--cppia <file>

generate Cppia code into target file

--cs <directory>

generate C# code into target directory

--java <directory>

generate Java code into target directory

--python <file>

generate Python code as target file

--hl <file>

compile HL code as target file


interpret the program using internal macro system


-p, --class-path <path>

add a directory to find source files

-m, --main <class>

select startup class

-L, --library <name[:ver]>

use a haxelib library

-D, --define <var[=value]>

define a conditional compilation flag

-r, --resource <file>[@name]

add a named resource file

--cmd <command>

run the specified command after successful compilation

--remap <package:target>

remap a package to another one

--macro <macro>

call the given macro before typing anything else

-C, --cwd <dir>

set current working directory


pass --global argument to haxelib


--dce [std|full|no]

set the dead code elimination mode (default std)


don't compile trace calls in the program


compiles but does not generate any file


disable inlining


disable code optimizations


-v, --verbose

turn on verbose mode


add debug information to the compiled code


prompt on error


measure compilation times



separate several haxe compilations


append preceding parameters to all Haxe compilations separated by --next



display code tips

--xml <file>

generate XML types description

--json <file>

generate JSON types description

Compilation Server

--server-listen [[host:]port]|stdio]

wait on the given port (or use standard i/o) for commands to run

--server-connect [host:]port]

connect to the given port and wait for commands to run

--connect <[host:]port>

connect on the given port and run commands there


--swf-version <version>

change the SWF version

--swf-header <header>

define SWF header (width:height:fps:color)


more type strict flash API

--net-std <file>

add a root std .NET DLL search path

--c-arg <arg>

pass option <arg> to the native Java/C# compiler



print version and exit

-h, --help

show extended help information


print help for all compiler specific defines


print help for all compiler metadatas

--run <module> [args...]

compile and execute a Haxe module with command line arguments


May 2020 haxe 4.0.5