Skip to content

The command-line compiler#

wake is the command-line compiler for Wonkey.

Please note

The actual executable name of the command-line compiler is different and depends on the operating system!

The compiler binary#

The Wonkey compiler wake is located in the bin/ directory of your Wonkey installation.
See the following table for the actual executable name on each host platform:

Platform Compiler binary
Windows /bin/windows/wake.exe
Linux /bin/linux/wake
macOS /bin/macos/wake
Raspberry Pi /bin/raspbian/wake

Hint

If you add the Wonkey/bin/%OS% directory to your PATH environment variable, you are able to use the Wonkey compiler directly from every directory on the command-line or in a terminal.

Compiler usage#

The command-line options for wake are:

wake command options input

Compiler commands#

Command Description
app Build an application.
input should be a *.wx file.
mods Build module(s).
input should be a space separated list of module names, or nothing to make all modules.
docs Build the documentation for a set of modules.
input should be a space separated list of module names, or nothing to make all modules.

Compiler options#

Option Description
-quiet Emit less info when building.
-verbose= Emit more info when building, one of: none, 0 to 3. (Defaults: 1 or -1 if quiet).
-clean Force clean rebuild.
-time Output build time information.
-parse Parse only. Checks for parsing errors.
-semant Parse and semant. Checks for parsing and semantic errors.
-translate Parse, semant and translate.
-build Parse, semant, translate and build.
-run Runs the application after successful build.
-target=target Set target to one of the following values:
desktop (default: alias for current host),
windows, macos, linux, raspbian,
android, ios, emscripten, wasm
-config=config Set config to:
debug, release, or all.
(Defaults: all for modules else debug)
-apptype=apptype Set apptype to:
gui (default) or console
-product=path path is the build output path

Examples#

Compile a desktop gui app in debug mode (default) and run it:

wake app main.wx

Compile a console application in release mode for the host operating system and run it:

wake app -config=release -apptype=console myfile.wx

Compile a game for the 'iOS' target:

wake app -config=release -target=ios mygame.wx

Build the complete docs:

wake docs

Force clean rebuild of all modules for the 'Android' target in release and debug mode:

wake mods -clean -target=android -config=debug
wake mods -clean -target=android -config=release

Compile your own module 'mymodule'. The module/library must be located in the 'modules' directory.

wake mods -config=debug mymodule
wake mods -config=release mymodule