-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Consider post-build scripts, too #1894
Comments
I would argue that many of these would just be additional Cargo commands that invoke 'build' first. |
I'm not sure how that works if you have multiple of them (e.g., cargo-sign the binary, then cargo-package the signed binary, then cargo-upload the package), but possibly I'm just being dense, as I haven't been able to figure out how to work custom Cargo commands into Servo's build process yet (because we'd want to build them during the build process, but then they have to be on the |
well, I'm thinking something like https://github.com/pwoolcoc/cargo-do, which lets you invoke multiple commands. So you'd write a basically, in my mental model, 'cargo foo' is the equivalent of a |
I'm also not sure that this fits well into a manifest per se. It goes a bit against the idea that Cargo's not "yet another build system" but rather just a tool to build with. I could imagine small scripts being available in separate locations and you just Some thorny questions I can think of are:
Using a separate crate altogether driven from a different location seems like a nice answer to many of these questions perhaps? |
I think using a separate crate is fine. I'm glad to have some guidance around it, as we've had a bunch of discussion on how to design these things in #servo and #cargo (and with @tomaka), so it's good to put a nail in it. Feel free to close the issue if you think there's nothing more to discuss! |
|
Ok for now I think I'm in camp "use an external build tool to script after the build finishes", but we can certainly perhaps explore options here if the need becomes more pressing. We'll probably never do a script feature like npm does (e.g. not cross platform), but we could certainly add the ability to add more Rust scripts which hook into the build process. |
Related discussion: #545 |
There are many actions that can be taken after the build that require custom steps:
While these can (and presumably are) done in larger projects by the autotools or CMake solution that is driving Cargo, it might be nice to be able to do it in Cargo itself instead of relying on the project's build runner.
The text was updated successfully, but these errors were encountered: