annguyenvan
New member
Posts: 6 Joined: Sat Jan 10, 2026 18:33
GitHub:
NguyenVanThinhAn
IRC: rick
In-game: clack
by annguyenvan » Sat Jan 10, 2026 19:05
Post
Hello everyone, I'm working on a mod for the engine I'm developing. However, I'm getting a security error, even though I've declared it in minetest.conf and rebuilt it so the dylib recognizes it.
Krock
Developer
Posts: 4713 Joined: Thu Oct 03, 2013 07:48
GitHub:
SmallJoker
Location: Switzerland
Contact:
by Krock » Sat Jan 10, 2026 21:30
Post
Example usage in your mod:
Code: Select all
local ie = core.request_insecure_environment()
ie.require("your_dylib_library_or_whatever.dylib")
ie.io.open("/path/that/you/couldnt/access.txt")
annguyenvan
New member
Posts: 6 Joined: Sat Jan 10, 2026 18:33
GitHub:
NguyenVanThinhAn
IRC: rick
In-game: clack
by annguyenvan » Sun Jan 11, 2026 03:05
Post
Krock wrote: ↑ Sat Jan 10, 2026 21:30
Example usage in your mod:
Code: Select all
local ie = core.request_insecure_environment()
ie.require("your_dylib_library_or_whatever.dylib")
ie.io.open("/path/that/you/couldnt/access.txt")
Does that mean the engine doesn't allow requiring C/C++ files? Because the way I connect Lua to C/C++ is the same as you described.
Blockhead
Moderator
Posts: 2834 Joined: Wed Jul 17, 2019 10:14
GitHub:
Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:
by Blockhead » Sun Jan 11, 2026 16:26
Post
Luanti mods do not ordinarily touch native code. To add more capabilities, if you really need them, one should use external Lua modules like
this mod .
Users browsing this forum: No registered users and 0 guests