mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 21:25:16 +00:00
1.3 KiB
1.3 KiB
Rojo Design - Protocol Version 1
This is a super rough draft that I'm trying to use to lay out some of my thoughts.
API
POST /read
Accepts a Vec<Route> of items to read.
Returns Vec<Option<RbxItem>>, in the same order as the request.
POST /write
Accepts a Vec<{ Route, RbxItem }> of items to write.
I imagine that the Name attribute of the top-level RbxItem would be ignored in favor of the route name?
CLI
Transform Plugins
Transform plugins (or filter plugins?) can interject in three places:
- Transform a
VfsItemthat's being read into anRbxItem - Transform an
Rbxitemthat's being written into aVfsItem - Transform a file change into paths that need to be updated
The plan is to have several built-in plugins that can be rearranged/configured in project settings:
- Base plugin
- Transforms all unhandled files to/from StringValue objects
- Script plugin
- Transforms
*.luafiles to their appropriate file types
- Transforms
- JSON/rbxmx/rbxlx model plugin
- External binary plugin
- User passes a binary name (like
moonc) that modifies file contents
- User passes a binary name (like
Roblox Studio Plugin
With the protocol version 1 change, the Roblox Studio plugin got a lot simpler. Notably, the plugin doesn't need to be aware of anything about the filesystem's semantics, which is super handy.