@JernejL:

Good news, I got the interface routines down to the now probably the minimum that I can:

Code:
  { IJetLuaContext }
  IJetLuaContext = interface
    ['{6AEC306C-45BC-4C65-A0E1-044739DED1EB}']


    function  PushCount: Integer;
    procedure ClearStack;
    procedure PopStack(aCount: Integer);
    function  GetStackType(aIndex: Integer): TLuaType;


    function  GetValue(aType: TJetLuaValueType; aIndex: Integer): TJetLuaValue;
    procedure PushValue(aValue: TJetLuaValue);


    procedure SetTableFieldValue(aName: PChar; aValue: TJetLuaValue; aIndex: Integer);
    function  GetTableFieldValue(aName: PChar; aType: TJetLuaValueType; aIndex: Integer): TJetLuaValue;
  end;


  { TLuaFunction }
  TJetLuaFunction = procedure(aLua: IJetLuaContext) of object;


  { IJetLua }
  IJetLua = interface
    ['{671FAB20-00F2-4C81-96A6-6F675A37D00B}']


    procedure Reset;


    procedure LoadFile(aFilename: PChar; aAutoRun: Boolean = True);
    procedure LoadString(aData: PChar; aAutoRun: Boolean = True);
    procedure LoadBuffer(aData: Pointer; aSize: NativeUInt; aAutoRun: Boolean = True);


    procedure Run;


    function  RoutineExist(aName: PChar): Boolean;
    function  Call(aName: PChar; const aParams: array of TJetLuaValue): TJetLuaValue;


    function  VariableExist(aName: PChar): Boolean;


    procedure SetVariable(aName: PChar; aValue: TJetLuaValue);
    function  GetVariable(aName: PChar; aType: TJetLuaValueType): TJetLuaValue;


    procedure RegisterRoutine(aName: PChar; aRoutine: TJetLuaFunction);


    procedure RegisterRoutines(aClass: TClass); overload;
    procedure RegisterRoutines(aObject: TObject); overload;
    procedure RegisterRoutines(aTables: PChar; aClass: TClass; aTableName: PChar=nil); overload;
    procedure RegisterRoutines(aTables: PChar; aObject: TObject; aTableName: PChar=nil); overload;


    procedure AddVerInfo(aValue: Boolean);
    procedure SetNoConsole(aValue: Boolean);
    procedure SetVerInfo(aCompanyName: PChar; aFileVersion: PChar;
      aFileDescription: PChar; aInternalName: PChar; aLegalCopyright: PChar;
      aLegalTrademarks: PChar; aOriginalFilename: PChar; aProductName: PChar;
      aProductVersion: PChar; aComments: PChar);
    procedure SetExeFilename(aFilename: PChar);
    procedure SetIconFilename(aFilename: PChar);
    procedure EnableRuntimeThemes(aValue: Boolean);
    procedure EnableHighDPIAware(aValue: Boolean);


    procedure Compile(aSourceFilename: PChar; aPayloadFilename: PChar);


    function  HasPayload: Boolean;
    procedure RunPayload;
  end;
Bad news:
I did some initial tests and in it's present form, it will not work with freepascal, sigh. It's currently taking advantage of a lot of Delphi'ish features. Hopefully at some point I can get it working with freepascal.