I actually thought this was unintentionally possible already, but the
search paths are indeed not added to the regular Lua ones so require()
can't find them, only module:require() which can't load binary modules.
One thing I might consider a blocker is that the plugin management code
can't _unload_ binary modules currently, so upgrading and reloading
modules is not enough.
If you're okay with needing extra steps to upgrade and replace code,
there are some things that can be done without code changes:
You could install the binary bits with luarocks into the Prosody home
directory:
sudo -u prosody luarocks install mybinarybits
Another trick would be to set the plugin installer path to
`~prosody/.luarocks`, i.e. the same path the above luarocks command
would use. Maybe this should have been the default, I'm not sure.
Then `prosodyctl install` and `luarocks install` (as the prosody user)
would be essentially the same.
installer_plugin_path = "/var/lib/prosody/.luarocks"
--
Zash