Skip to content
Adrian Samoticha edited this page Jan 14, 2023 · 2 revisions

HashLink can be easily embedded into any application to provide very fast scripting capabilities.

It consists of separate parts:

  • libhl is the HashLink runtime, that can be dynamically linked
  • HL boot, with its bytecode loader code.c, module initializer module.c, jit support jit.c, and (optional) debugger debugger.c

All of these are initialized and controlled by main.c which does the following:

  • parse command-line arguments
  • load the .hl bytecode
  • initialize HL runtime
  • allocate and initialize a module (jit the code)
  • setup exception catching
  • call module entry point (starts it)
  • catch and print exceptions (if any)

You can see the full source for it here:

https://github.com/HaxeFoundation/hashlink/blob/master/src/main.c

You can read the C API Documentation for more details about how to integrate with your application.

Clone this wiki locally