lmtoptional.c /size: 1346 b    last modification: 2024-01-16 10:22
1/*
2    See license.txt in the root of this project.
3*/
4
5# include "luametatex.h"
6# include "lmtoptional.h"
7
8/*tex
9
10    We don't want the binary to explode and have depdencies that will kill this project in the
11    end. So, we provide optionals: these are loaded lazy and libraries need to be present in
12    the tree. They are unofficial and not supported in the sense that ConTeXt doesn't depend on
13    them.
14
15    The socket library is a candidate for ending up here too, as are the optional rest modules
16    lzo and lz4.
17
18*/
19
20int luaopen_optional(lua_State *L) {
21    /*tex We always have an |optional| root table. */
22    lmt_library_initialize(L);
23    luaopen_library(L);
24    luaopen_foreign(L); /* maybe in main */
25    /*tex These are kind of standard. */
26    luaopen_sqlite(L);
27    luaopen_mysql(L);
28    luaopen_postgress(L);
29    luaopen_curl(L);
30    luaopen_ghostscript(L);
31    luaopen_graphicsmagick(L);
32    luaopen_imagemagick(L);
33    luaopen_zint(L);
34    /*tex These are fun. */
35    luaopen_mujs(L);
36    /*tex These might be handy. */
37    luaopen_lzo(L);
38    luaopen_lz4(L);
39    luaopen_zstd(L);
40    luaopen_lzma(L);
41    /*tex These are extras. */
42# ifdef LMT_KPSE_TOO
43    luaopen_kpse(L);
44# endif
45# ifdef LMT_HB_TOO
46    luaopen_hb(L);
47# endif
48    /*tex These are for testing. */
49    luaopen_openssl(L);
50    /*tex Done. */
51    return 0;
52}
53