rojo
rojo copied to clipboard
Split Rojo library
Hey 👋
I'd like to have a way to depend on rojo, without bringing the whole library into my other project (darklua).
I am currently prototyping path imports. I think I am mostly interested in the ProjectNode struct.
My idea would be to create a smaller library within Rojo, like memofs
that other tools like darklua, selene, Roblox LSP could use to get information on how files are put in the DataModel.
If you are ok with the idea in general, I can start creating a prototype and draft a PR as a proposal 🙂
It's sort of unintuitive, but if you want to try this today you actually can depend on Rojo:
[dependencies]
rojo = "=7.0.0"
...and then use it via the name librojo
:
fn main() {
librojo::cli::DocCommand {}.run().unwrap()
}
See: https://docs.rs/rojo/latest/librojo/index.html
There aren't any guarantees that the API will be stable so I recommend using an exact dependency. If we can figure out an API that's helpful and also semi-stable, I would be open to publishing this as a separate crate.
Does the "newly" introduced rojo sourcemap
solve your problem?
Yes I think it does 👍
Thanks for the followup!
Please do close this issue then!
I think that, though the original use case was solved, I think we should still split Rojo into a library!