Open alysbrooks opened 1 year ago
This is something covered in an old PDF: https://www.moonsharp.org/MoonSharpStdLib.pdf .
Essentially, the package
library is replaced by providing .NET-side script loader implementations in both MoonSharp and WattleScript. However, it may be worth investigating if the standard script loader provided by WattleScript can make use of some of these package fields in an emulation mode.
Happy to review a PR on it
WattleScript's Lua mode is missing some fields in
package
that "standard" Lua (PUC Lua) has. In particular, the lack ofpackage.preload
,package.path
, andpackage.searchers
prevents Fennel from working.I'm not sure whether this is partly a case of missing functionality or if the functionality is essentially all there and just needs to be exposed via
package
. I'm hoping it is all there because I don't see anything on the list of differences that would suggest this is a piece of functionality that's missing. I would like to submit a PR to address this, but am not sure I could add substantial functionality to the Lua mode's package functionality.You can also read the original issue filed against MoonSharp.