Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upConsider post-build scripts, too #1894
Comments
This comment has been minimized.
This comment has been minimized.
|
I would argue that many of these would just be additional Cargo commands that invoke 'build' first. |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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 |
alexcrichton
added
the
A-configuration
label
Aug 12, 2015
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
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! |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
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. |
alexcrichton
closed this
Aug 13, 2015
This comment has been minimized.
This comment has been minimized.
|
Related discussion: #545 |
larsbergstrom commentedAug 11, 2015
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.