Chapter 10. Interfacing with the Target Platform

Working with your platform.

Being able to use the interns of the platform you are targeting or to work with native code can be really useful: it may lead to being able to easily use some functionality of a library or to optimize your code. However, it also has its drawbacks.

We have now learned about the basics of haXe and are going to get into more technical stuff—interfacing with the target platform. Doing so may be really useful for several things, such as using a library that has been written for the target platform. It is sometimes useful in order to optimize your code too.

In this chapter we will:

  • Learn about what extern classes are
  • The magic functions
  • Interfacing with native code

So, if you are ...

Get haXe 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.