8000 lua::create_require_function · Issue #562 · mlua-rs/mlua · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lua::create_require_function #562

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
cheesycod opened this issue Apr 25, 2025 · 2 comments
Closed

lua::create_require_function #562

cheesycod opened this issue Apr 25, 2025 · 2 comments

Comments

@cheesycod
Copy link
cheesycod commented Apr 25, 2025

Continuation of #558 since the original issue has been solved. It would be nice if mlua had a lua::create_require_function API as explained in my final comment on #558 about that being possible. The lua::create_require_function would return a LuaResult<LuaFunction> and would take as input, an impl Require

@khvzak
Copy link
Member
khvzak commented Apr 25, 2025

I revised the implementation and added Lua::create_require_function method. LuaOptions reverted to the original state and you need to use create_require_function to create a new or override the existing one.
The default require function will be unconditionally loaded.

@khvzak khvzak closed this as completed Apr 25, 2025
@cheesycod
Copy link
Author

I revised the implementation and added Lua::create_require_function method. LuaOptions reverted to the original state and you need to use create_require_function to create a new or override the existing one. The default require function will be unconditionally loaded.

Tysm, this fully solves my problem!

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