To make this work for qlf files, you’ll need to preserve the extension. If you save the .qlf as prolog.pl it will try to read it as source code Otherwise, qlf files are a reasonable way to deal with some of the issues of dealing with multiple files. They are architecture independent, but quite strongly tied to the Prolog version. The code should also not use conditional compilation (
:- if(...).
) where conditions differ between the system generating the qlf and the (wasm) target.
I guess that ideally it copies a directory (preserving the structure), at least as one of the options.