Scribunto should support invocations of modules stored on different wikis. This would allow the development of global modules, not specific to just 1 wiki. There are two basic ways to implement this, I think:
- Follow the Wikimedia Commons model, where you have a single central repository of modules that can be called on a cluster of wikis. Perhaps include precedence support, so that {{#invoke:Foo}} tries the central repo first before looking at the local module name. You could possibly also add local: syntax or something to be explicit if you always wanted the local module.
- Follow the interwiki template transclusion model, where any wiki can call modules from another wiki using interwiki link syntax. For example, {{#invoke:w:en:Foo}} would call the Foo module at the English (en) Wikipedia (w).
See Also
T11890: Interwiki transclusions are unreasonably inefficient
Usage on Wikimedia sites
Depending on which model is chosen, additional tasks may need to be filed. In particular, if a central repository model is chosen, there needs to be a discussion about where to host such modules (for example, scripts.mediawiki.org or scripts.wikimedia.org) and what to host alongside them (for example, JavaScript gadgets). This is probably already tracked by T52329 or T121470.
Note this is just one of multiple possible ways to implement global modules; alternatively (and more likely) we can use a common Module repo (see Produnto) to accomplish that. However even if we have such a common Module repo, this task is still something nice to have.