Skip to content

Commit

Permalink
https://github.com/rust-lang/cargo/issues/14001
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed Jun 3, 2024
1 parent d30ea7b commit b102709
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cargo.lock
target
7 changes: 0 additions & 7 deletions Cargo.lock

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["http", "server", "https", "webdav", "directory"]
categories = ["network-programming", "web-programming::http-server"]
license = "MIT"
build = "build.rs"
version = "2.0.1"
version = "2.0.2"
# Remember to also update in http.md
authors = ["nabijaczleweli@nabijaczleweli.xyz"]

Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,23 @@ See [the manpage](http.md) for full list.
If you have `cargo` installed (you're a Rust developer) all you need to do is:

```sh
# unix:
RUSTC_BOOTSTRAP=1 cargo install --git https://github.com/thecoshman/http
```
```cmd
rem windows:
set RUSTC_BOOTSTRAP=1
cargo install --git https://github.com/thecoshman/http
```
(the `https` crates.io package *was* http, but [is now unpublishable](//github.com/thecoshman/http/pull/160#issuecomment-2143877822)).
Similarly, cargo [*expressly ignores* configuration that lets the crate be built](https://github.com/rust-lang/cargo/issues/14001) when building through `cargo install`,
hence the need for manual `RUSTC_BOOTSTRAP=1`, you may also want to set
```sh
cargo install-update-config -e RUSTC_BOOTSTRAP=1 https
```
for use with [cargo-update](//crates.io/crates/cargo-update)

Which will install `http` and `httplz` (identical, disable one or another if they clash) in the folder where all other binaries go.
This will install `http` and `httplz` (identical, disable one or another if they clash) in the folder where all other binaries go.

#### From Debian repository

Expand Down
10 changes: 9 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ fn main() {
eprintln!("This is for a mundane reason of needing to vendor patched dependencies: https://github.com/thecoshman/http/pull/160#issuecomment-2143877822");
eprintln!("");
eprintln!("Please install http from git by running");
eprintln!(" cargo install -f --git https://github.com/thecoshman/http");
#[cfg(not(windows))]
eprintln!(" RUSTC_BOOTSTRAP=1 cargo install -f --git https://github.com/thecoshman/http");
#[cfg(windows)]
{
eprintln!(" set RUSTC_BOOTSTRAP=1");
eprintln!(" cargo install -f --git https://github.com/thecoshman/http");
}
eprintln!("and then update as normal.");
eprintln!("For use with cargo-update, also do");
eprintln!(" cargo install-update-config -e RUSTC_BOOTSTRAP=1 https");
eprintln!("");
eprintln!("You will continue to only receive normal, full, releases.");
eprintln!("");
Expand Down

0 comments on commit b102709

Please sign in to comment.