8000 Support registermodule once 671 comes out · Issue #563 · mlua-rs/mlua · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support registermodule once 671 comes out #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8519
cheesycod opened this issue Apr 25, 2025 · 0 comments
Closed

Support registermodule once 671 comes out #563

cheesycod opened this issue Apr 25, 2025 · 0 comments

Comments

@cheesycod
Copy link
cheesycod commented Apr 25, 2025

[sorry for all the GitHub issues, it’s just that luau require is a pretty big thing so yeah]

Luau 671 (still in pr status) now supports registering builtin ‘modules’ (LuaTables) as aliased paths:

// Registers an aliased require path to a result. After registration, the given
// result will always be immediately returned when the given path is required.
// Expects the path and table to be passed as arguments on the stack.
LUALIB_API int luarequire_registermodule(lua_State* L);

Can mlua expose (once 671 is out) a Lua::register_require_module(String or &str, LuaTable) -> Result method too? This would be the final thing needed for runtimes ngl

Also 671 namespaced most luau require methods to luarequire so lua_pushrequire is now luarequire_pushrequire

671 also adds proxy require too

@khvzak khvzak closed this as completed Apr 26, 2025
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

No branches or pull requests

2 participants
0