initial implementation of mlua for loading plugins, see todo.md in examples

This commit is contained in:
2026-04-27 14:53:24 +02:00
parent fe48b74edc
commit 77e80c990c
10 changed files with 278 additions and 54 deletions
+32
View File
@@ -0,0 +1,32 @@
# mlua-plugin-addition todo list
## implemented ("working")
- [x] **cli args**
`--lua-plugin` and `--lua-arg` (multiple) added with `clap`
- [x] **lua scripting**
`lua_plugin.rs` with `LuaRouter` userdata
- [x] **file server mounting from lua**
`router:add_file_server(prefix, root)` paths relative to plugin file
- [x] **route registration from lua**
`router:add_static(path, status, body, content_type)`
- [x] **fallback static file server**
Original `resolve_fs` logic still works for non lua routes
- [x] **pass cli args to lua**
Accessible as `args` table inside Lua scripts.
## fixing implementing needed
- [ ] **better error messages from Lua**
log something at all. write a custom logger ; and use logger_rs for it
- [ ] **hot reload of lua plugins**
i want this
- [ ] **more lua api functions**
very bare bones right now