Dear package developers,I think I found a good solution to this problem which may be relevant for some of you.?I have written an package ("rolog") that embeds Swi-Prolog so that R can send queries to a prolog interpreter. The thing is working, but very large, I think 15 MB, and CRAN "noted" it. Whenever I add a little feature I have to update the entire package, and so have its users (currently: 0, but that might change). Moreover, people who use the package would normally also have Swi-Prolog on their computer.Therefore, I have now written a second package ("rologlite") that just links to the Swi-Prolog dll, which is much smaller in size than embedding it). It searches for Swi-Prolog in the path, in the registry, in the environment, and if all this fails, it checks if rolog is installed and looks for the swipl dll in the rolog package. If all the above fails, a warning is printed, telling the user to install Swi-Prolog or the rolog package. In its DESCRIPTION it "suggests" rolog so that the latter is available on e.g. CRAN winbuilder when building the vignette or running the unit tests.I prefer this option over downloading and compiling an external library, e.g. in nloptr. Everything is done from within R, self-contained.In case I overlooked something, any hint to an even better way is appreciated.Best wishes?Matthias?
[R-pkg-devel] Linking to a large external library
3 messages · Matthias Gondan, Ben Engbers
1 day later
"rologlite" verwijst naar een .dll file. Ik neem dus aan dat deze package bedoeld is voor Windows. Mijn vraag is of "rologlite" ook gebruikt kan worden op Linux? Zo ja, dan ben ik zeer benieuwd en ga ik kijken hoe ik dat voor mijn ontwikkelwerkzaamheden kan gebruiken? Ben Engbers Op 08-06-2022 om 22:24 schreef matthias-gondan:
Whenever I add a little feature I have to update the entire package, and so have its users (currently: 0, but that might change).
Maybe I'll be the first ;-)
Therefore, I have now written a second package ("rologlite") that just links to the Swi-Prolog dll, which is much smaller in size than embedding it). It searches for Swi-Prolog in the path, in the registry, in the environment, and if all this fails, it checks if rolog is installed and looks for the swipl dll in the rolog package.
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Hi, "rologlite" refers to a .dll file. So I assume that this package is intended for Windows. My question is can "rologlite" also be used on Linux? If so, I am very curious and will I see how I can use it for my development work? Ben Engbers Op 08-06-2022 om 22:24 schreef matthias-gondan:
Whenever I add a little feature I have to update the entire package, and so have its users (currently: 0, but that might change).
Maybe I'll be the first one ;-)
It searches for Swi-Prolog in the path, in the registry, in the environment, and if all this fails, it checks if rolog is installed and looks for the swipl dll in the rolog package.
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel