Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a plugin system to enable developers to expand Mantle in creative ways #128

Open
blake-mealey opened this issue Feb 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@blake-mealey
Copy link
Owner

blake-mealey commented Feb 13, 2022

Mantle could enable developers to expand functionality by supporting a plugin system. Some feature ideas I have had don't seem like they should be included in the core tool. However, they could be implemented as plugins that can be optionally installed if users want those features.

Some ideas for plugins:

@blake-mealey
Copy link
Owner Author

I think the nicest way to implement plugins would be to provide a hooks API for plugins written in an interpreted language that would be called at various stages of the resolution process.

The most obvious language choice is Lua since that's what the Roblox community is familiar with.

Some hooks that the plugins would need access to in order to implement the above ideas:

  • Reading files from disk and transforming their contents
  • Knowing what files will be used for when reading from disk
  • Viewing the created resources in Roblox

Something we could consider is letting plugins implement new resource types. However, this would require opening up the config file for extensions and would move some of the core logic of managing resources outside of Rust which reduces safety and security. For example, should the plugins be given direct access to the roblosecurity cookie? Probably not.

@blake-mealey
Copy link
Owner Author

Some of these plugins could be built as "official" plugins.

Something to keep in mind here is they need to be easy to install. And, they need to be able to include dependencies (nobody is going to implement a wav to mp3 plugin if they can't import a wav to mp3 Lua library).

@blake-mealey
Copy link
Owner Author

A simpler first iteration of this would be to just call configured commands at certain hooks

@blake-mealey
Copy link
Owner Author

This could be a cool way to implement this: https://extism.org/

Also would be cool to have Lua support for this. Maybe the Roblox OSS discord could take a stab at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant