Haxe Code Cookbook

Community driven Haxe code snippets, examples and tutorials.

Learn with Haxe

There are many ways to learn Haxe. On this website you'll find a lot of resources you need to become a Haxe developer.

So why not start learning and join the community today? If you haven’t learned Haxe yet, the time is now.

Latest articles

Aug 31, 2017 Beginner / Pattern matching

This article helps to learn pattern matching and all of its type of matching in practice. The article covers basic matching, variable capture, guards, extractors and enum/structure matching.‥

Read »

Aug 24, 2017 Other / Base64 encoding

This article shows how to use base64 in Haxe and how to use a custom charset.‥

Read »

Jul 11, 2017 Beginner / Using strings

Defining string literals take be done by wrapping text inside double or single quotes:‥

Read »

Jul 04, 2017 Macros / Include a file next to a Haxe module file

This example lets you take a file next to the current module .hx file and include its file content. That can be very useful if you want to separate (for example) view templates, shader sources or other multiline texts from the Haxe source. The articles demonstrates how to do it with an expression macro but also with a build macro.‥

Read »

The cross-platform development toolkit

Haxe is a modern high-level strictly-typed programming language with a fast optimizing cross-compiler.

Download Haxe 3.4.3
Released: 2017-09-12

Learning by example

The Haxe Foundation facilitates the following code cookbook for the Haxe commmunity. Enjoy learning Haxe; It is great!

More documentation:

Haxe Manual

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Contribution is easy

The project is being developed on GitHub. Feel free to contribute code snippets, tutorials and how-to guides.

Haxe Code Cookbook on Github

Star   Fork