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

Install plugin from CLI #200

Closed
Kampfkarren opened this issue Jun 18, 2019 · 8 comments · Fixed by #304
Closed

Install plugin from CLI #200

Kampfkarren opened this issue Jun 18, 2019 · 8 comments · Fixed by #304
Labels
type: enhancement Feature or improvement that should potentially happen

Comments

@Kampfkarren
Copy link
Member

Kampfkarren commented Jun 18, 2019

Rojo should be able to install the plugin from the CLI. This would make #169 easier since there wouldn't need to be any special procedure for installing the built in plugin side (maybe even the whole plugin can be built in?).

The weird part is how to actually accomplish this. There's many possibilities but none are that great. The ideas I can think of off the top of my head are:

  • Downloading from online. This is the easiest to do but has complications with versions and local development.

  • Bundling the plugin somehow, like with include_str! or some build script mumbo jumbo. This has issued with cargo install, but maybe Rojo should release its own binaries anyway, asking people to install Rust to use Rojo is a bit clunky. The docs denounce other syncing tools for having to have the user install their language's environment: "I think that this tool needs to be built in a compiled language without a runtime, for easy distribution and good performance.".

@LPGhatguy LPGhatguy added the type: enhancement Feature or improvement that should potentially happen label Jun 19, 2019
@LPGhatguy
Copy link
Contributor

The original approach I took was to use a Cargo feature to include_bytes! an rbxm containing the plugin. It was okay, and actually stuck around for a long time before I axed that part of the codebase.

Hurting the cargo install approach is kind of sad, though I would like to start distributing binaries through more avenues!

@Kampfkarren
Copy link
Member Author

@LPGhatguy Build scripts could package an rbxmx (and in the future, rbxm) automatically, is that a reasonable approach?

@LPGhatguy
Copy link
Contributor

A build script would need a copy of Rojo to bundle in. They run when you cargo install, not at publish time, so I don't follow how they'd help!

@Kampfkarren
Copy link
Member Author

Kampfkarren commented Jun 19, 2019

If cargo install is scrapped in favor of direct binary builds, then the build script should work? I don't see a great solution without killing it.

@LPGhatguy
Copy link
Contributor

I don't think we're dropping cargo install, since without an OS-level package manager it's by far the easiest way to install/upgrade Rojo.

@Kampfkarren
Copy link
Member Author

Actually, I don't believe crates on Cargo have to be exclusively Rust code. All they really need is a Cargo.toml file in them, the rest is just tarballs. Any way we could use this to our advantage here?

@LPGhatguy
Copy link
Contributor

Cargo rejects things that aren't checked into source control by default when you cargo upload.

@jeparlefrancais had a good idea, which is to include the plugin source in some sort of tarball-y thing, like by generating some bincode in build.rs and using include_bytes! on it.

We could take this idea a step further and split apart Rojo's library and binary parts more. Then we can consume the library part from Rojo's build.rs script, programmatically build the plugin, and include it in the binary portion!

@Kampfkarren
Copy link
Member Author

Kampfkarren commented Aug 11, 2019

We could take this idea a step further and split apart Rojo's library and binary parts more. Then we can consume the library part from Rojo's build.rs script, programmatically build the plugin, and include it in the binary portion!

Does the new reconciler make this easier?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Feature or improvement that should potentially happen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants