Skip to content

Illumos: Support dynamic modules - #20

Merged
khvzak merged 1 commit into
mlua-rs:mainfrom
notpeter:illumos
Sep 20, 2026
Merged

khvzak merged 1 commit into
mlua-rs:mainfrom
notpeter:illumos

Conversation

@notpeter

@notpeter notpeter commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

This changes the Illumos target to add LUA_USE_DLOPEN so it can support dynamic modules. This brings behavior on Illumos in line with how lua-src-rs operates on Linux, FreeBSD, OpenBSD, NetBSD, DragonflyBSD, etc.

Don't use LUA_USE_LINUX as that also enables LUA_USE_READLINE and most Illumos distributions do not ship with libreadline.

lua-src-rs/src/lib.rs

Lines 138 to 146 in 4ffbec7

_ if target.contains("linux") => {
config.define("LUA_USE_LINUX", None);
}
_ if target.ends_with("bsd")
|| target.contains("netbsd")
|| target.contains("dragonfly") =>
{
config.define("LUA_USE_LINUX", None);
}

#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
#define LUA_USE_READLINE /* needs some extra libraries */
#endif

@khvzak
khvzak merged commit 4697476 into mlua-rs:main Sep 20, 2026
84 checks passed
@notpeter
notpeter deleted the illumos branch September 21, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants