
Callisto is a lightweight and powerful ? that integrates LuaJIT scripting into Delphi, enabling you to easily add a scripting layer to your Delphi apps. Whether you're building dynamic software , adding mod support , or simply looking for a way to make your apps more flexible and customizable, Callisto makes this possible through simple, straightforward APIs.
Callisto offers a bridge ? between Delphi and LuaJIT, providing a powerful scripting solution to extend the capabilities of your Delphi projects. With Callisto, Delphi developers can enjoy all the benefits of embedding a dynamic, fast ⚡, and easy-to-use scripting language like Lua, while leveraging LuaJIT for high performance ?️.
This library is designed to make integrating Lua into Delphi applications as seamless as possible, focusing on usability, efficiency, and a minimal learning curve ?. All dependencies are compiled directly into the executable, eliminating the need for external DLLs and making deployment simpler and more reliable ✅.
dbg() in your Lua scripts to start interactive debugging.import command to combine scripts, compile them into a single file, and optionally store them as an EXE resource for a fully self-contained application.This section will help you get Callisto up and running in your Delphi environment.
Clone or download the Callisto repository .
Add the Callisto source files to your Delphi project.
? Download the latest version of Callisto.
Extract the contents to your project directory.
➕ Add the Callisto src folder to your Library Path in Delphi.
In your project, include Callisto in the uses clause.
? Refer to the examples folder for detailed usage instructions and demonstrations of the PSFML library in action.
That's it! You should now be able to start scripting with Lua in your Delphi projects .
Here are some simple examples to demonstrate how to integrate Callisto into your Delphi project:
var
LCallisto: TCallisto;
begin
LCallisto := TCallisto.Create();
LCallisto.LoadString('print("Hello from Lua!")');
LCallisto.Free();
end;class procedure TMyClass.DelphiRoutine(const ALua: ICallistoContext);
begin
// Example routine that pushes a string result onto Lua stack
ACallisto.PushValue('Hello from Delphi!');
end;
var
LCallisto: TCallisto;
begin
LCallisto := Callisto.Create();
LCallisto.RegisterRoutine('DelphiRoutine', TMyClass.MyDelphiRoutine);
LCallisto.LoadString('DelphiRoutine()');
LCallisto.Free();
end;var
LCallisto: TCallisto;
LResult: TCallistoValue;
begin
LCallisto := TCallisto.Create();
LCallisto.LoadString('function greet() return "Hello from Lua!" end');
LResult := LCallisto.Call('greet', []);
ShowMessage(LResult.AsString);
LCallisto.Free();
end;Callisto also supports advanced features like:
dbg() in Lua code to begin debugging, useful for identifying issues during runtime.import to bundle various script files into a single compilation unit, which is useful for saving and loading compiled scripts as resources.CompileToStream(), allowing efficient packaging and distribution.The Callisto API has been designed to be both powerful and easy to use. Below is a quick reference to key classes and methods:
Explore the in-depth discussion about Callisto, its features, and its use cases.
Contributions to Callisto are highly encouraged. Please feel free to submit issues, suggest new features, or create pull requests to expand the capabilities and robustness of the scripting engine.
Callisto is distributed under the ? BSD-3-Clause License, allowing for redistribution and use in both source and binary forms, with or without modification, under specific conditions. See the LICENSE file for more details.
We hope Callisto helps make your Delphi projects more dynamic and flexible. Happy coding! ?
Made with ❤️ in Delphi