-
Notifications
You must be signed in to change notification settings - Fork 189
Add a release script #31
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
base: master
Are you sure you want to change the base?
Conversation
Thank you for this patch! Normally, this buildpack is supposed to be used with an explicit
Do you know if it's possible to work on Cloud Foundry without a Thank you for suggesting this, and I appreciate any help you can provide! I would definitely like to support Cloud Foundry. |
Buildpacks don't seem to work in cloud foundry without a release script these days. I tested with your heroku-rust-cargo-hello which includes a Procfile. I don't see an elegant way not to use "cargo run", but I haven't dug deeply. I looked to http://engineering.pivotal.io/post/creating-a-custom-buildpack/ for inspiration as well as the release script that comes with the go buildpack. Their release scripts are over-complex in my opinion given that "cargo run" might be all you ever need with rust. |
Honestly, I don't know why Maybe CloudFoundry is doing something really weird? In any case, the more that I think about it, the more that I'm convinced that using In order to accept this PR:
If CloudFoundry is fundamentally very different from Heroku under the hood, you might just want to fork this buildpack and make a CloudFoundry-specific version. Or we could figure out how to ask |
According to cargo issue 1706 one can provide output file name with |
So I've checked $ mkdir output-filename
$ cd output-filename/
$ cargo init
Created binary (application) package
$ cargo rustc -v --release -- -o filename
Compiling output-filename v0.1.0 (/private/tmp/output-filename)
Running `rustc --edition=2018 --crate-name output_filename src/main.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 -o filename -C metadata=c961d75f8bcf3c48 -C extra-filename=-c961d75f8bcf3c48 --out-dir /private/tmp/output-filename/target/release/deps -L dependency=/private/tmp/output-filename/target/release/deps`
warning: due to multiple output types requested, the explicitly specified output file name will be adapted for each output type
warning: ignoring --out-dir flag due to -o flag
warning: ignoring -C extra-filename flag due to -o flag
Finished release [optimized] target(s) in 0.39s
$ ls
Cargo.lock filename-c961d75f8bcf3c48 src
Cargo.toml filename-c961d75f8bcf3c48.d target Not sure if the hash is a bug, ref the warning telling
If you are interested, I can create a PR using this technique when a |
I would be interested in PR using this technique, yes! (Sorry for the slow replies; I'm maintaining too many open source projects and GitHub hasn't let me into Notifications Beta yet, so it's really easy for things to slip through the cracks.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Held pending changes described in issue. Thank you!
It appears that modern cloud foundry requires a simple release script in order to run.