You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a large family of languages that transpile to Lua, Teal and Fennel being some of them.
Right now supporting a new transpiled language still likely requires creating a whole new ScriptHost and AssetLoader, what If we instead allowed users to "hook" into the existing asset loader and allow other extensions to be loaded to the same asset?
Are the bevy asset preprocessor flows a good choice for this?
The text was updated successfully, but these errors were encountered:
As an example, I started working on a Fennel mod that tries to set up a dedicated Lua context for transpiling inside the AssetReader, then hands off the Lua source to the standard LuaScriptHost in the usual way:
Note: Since the Fennel compiler is just a Lua module, I'm loading its source from a large string and using lazy_static so I only need to do that once. So far this works to load the Fennel source and execute inline functions. There seems to be a bug calling modules defined in the Fennel at the moment.
Assuming the issue can be resolved, this may be a good testbed to try a version where we use a preprocessor. This may also be the right place to note it would be good to be able to AoT compile Fennel for packaging. Ideally, the runtime compiler would be used during dev, and the Fennel source would be precompiled to Lua during a release build, inlined, and loaded directly by a released binary.
There is a large family of languages that transpile to Lua, Teal and Fennel being some of them.
Right now supporting a new transpiled language still likely requires creating a whole new ScriptHost and AssetLoader, what If we instead allowed users to "hook" into the existing asset loader and allow other extensions to be loaded to the same asset?
Are the bevy asset preprocessor flows a good choice for this?
The text was updated successfully, but these errors were encountered: