[luatex] LuaTeX as a Library
Nicolas.Holzschuch at inria.fr
Thu Oct 12 09:23:38 CEST 2017
> On 11 Oct 2017, at 23:50, Robert Krug <destiny6 at mac.com> wrote:
> I have not gotten any further, but a couple of days ago I decided to try again
> with the latest LuaTeX, so this is a timely prompt to actually do so. I am not
> really much of a programmer, so Nicolas Holzschuch, for instance, may have
> a much better start than I do. However, this is something I would like to see,
> and will get back to it in the next couple of days.
> Is your lib_luatex.dylib using LuaTeX 1.0 or later? Is it in a state where you would
> be willing to share it?
I am willing to share it. I am open to suggestions as to what would be the best format for release; I could copy my entire texlive/texk directory to a github repository (quick easy fix for now, problems for maintainance down the road). You people might have more clever suggestions. I am working on both pdftex and luatex.
Also, some of the changes are related to cross-compiling, but I don't think that is going to cause problems.
Right now, my biggest issue is memory management. If you call luatex as a shell command, all memory is released on exit, and reinitialized when you restart. If it's in a library, memory allocated on the first call stays allocated for the second call. So on the second call, luatex has several variables and trees already allocated, resulting in assert() failed.
TL;DR: I have a library that can call luatex exactly once. I am working on the uexit() function so it frees everything that has been allocated.
>> On Oct 11, 2017, at 07:52, Patrick Gundlach <patrick at gundla.ch> wrote:
>> I know it is an old mail....
>>> Am 26.02.2016 um 19:09 schrieb Robert Krug <destiny6 at mac.com>:
>> Hello Robert,
>> did you get any further with your experiments? Is there any news here? I'd be really interested in playing around with a shared LuaTeX (Mac, but also other systems as well).
More information about the luatex