lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Nov 17, 2016 at 6:37 PM, Peter Aronoff <telemachus@arpinum.org> wrote:
>
> When people write C bindings for a library like discount that is not
> a standard system library (i.e., you wouldn’t expect users already to have
> it installed), do people generally prefer to bundle a version of the
> C library with the Lua bindings or to leave that to the user?

Depends on how complicated the library is. I maintain two libraries
which have C bindings, luaharfbuzz[1] and luaucdn[2]. Harfbuzz[3] is
actually C++ and complicated to install, so I do not bundle it with
the library and expect users to install it themselves. But ucdn[4] is
just a C file along with a header file, so I bundle it in.

In the case of discount, my preference would be to bundle it in. It
seems simple enough.

[1]: https://github.com/deepakjois/luaharfbuzz
[2]: https://github.com/deepakjois/luaucdn
[3]: https://github.com/behdad/harfbuzz
[4]: https://github.com/grigorig/ucdn