2. Embedding Quirrel
This section describes how to embed Quirrel in a host application, C language knowledge is required to understand this part of the manual.
Because of his nature of extension language, Quirrel’s compiler and virtual machine are implemented as C library. The library exposes a set of functions to compile scripts, call functions, manipulate data and extend the virtual machine. All declarations needed for embedding the language in an application are in the header file ‘squirrel.h’.
- 2.1. Memory Management
- 2.2. Build Configuration
- 2.3. Error Conventions
- 2.4. Virtual Machine Initialization
- 2.5. The Stack
- 2.6. Runtime error handling
- 2.7. Compiling a script
- 2.8. Calling a function
- 2.9. Create a C function
- 2.10. Tables and arrays manipulation
- 2.11. Userdata and UserPointers
- 2.12. The registry table
- 2.13. Mantaining references to Quirrel values from the C API
- 2.14. Debug Interface