Skip to content

Commit

Permalink
fix(openssl): make feature vendored-openssl opt in by default (#887)
Browse files Browse the repository at this point in the history
#883 and restores former default installation behavior
  • Loading branch information
sassman committed Feb 25, 2023
1 parent 7902d6b commit 54d6367
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Expand Up @@ -28,7 +28,7 @@ home = "~0.5"
sanitize-filename = "~0.4"
rhai = "~1.12"
path-absolutize = "~3.0"
gix-config = "~0.16.3"
gix-config = "0.16.3"
paste = "~1.0"
names = { version = "~0.14", default-features = false }

Expand Down Expand Up @@ -68,9 +68,9 @@ features = [
]

[features]
default = ["vendored-libgit2", "vendored-openssl"]
default = ["vendored-libgit2"]
vendored-libgit2 = ["git2/vendored-libgit2"]
vendored-openssl = ['openssl/vendored', "git2/vendored-openssl"]
vendored-openssl = ["openssl/vendored", "git2/vendored-openssl"]

[[bin]]
path = "src/main.rs"
Expand Down
32 changes: 20 additions & 12 deletions guide/src/installation.md
@@ -1,32 +1,40 @@
# Installation

## Using `cargo` with vendored libgit2 and OpenSSL
## Using `cargo-generate` with vendored `libgit2` and system's OpenSSL
By default, cargo-generate uses vendored sources for `libgit2` and OpenSSL that is installed on your system.

```sh
cargo install cargo-generate
```

By default, cargo-generate uses vendored sources for libgit2 and OpenSSL,
this would require the following dependencies on your system, as documented by the [`openssl` crate]:
This requires the following dependencies on your system:
- `libssl-dev` (this could also be named openssl)

## Using `cargo-generate` with vendored OpenSSL
However, you can also opt in to use a vendored OpenSSL version.
So that you don't have to have OpenSSL installed and built it on the spot.

- A C compiler (gcc, for example)
- perl (and perl-core)
- make
this would require the following dependencies on your system, as documented by the [`openssl` crate]:
- A C compiler (`gcc`, for example)
- `perl` and `perl-core`
- `make`

## Using `cargo` with system's libgit2 and OpenSSL
```sh
cargo install cargo-generate --features vendored-openssl
```

You can opt-out of vendored libraries and use libgit2 and OpenSSL from your system
## Using `cargo-generate` with system's `libgit2` and system's OpenSSL
You can opt-out of vendored libraries and use `libgit2` and OpenSSL from your system
by building cargo-generate without the default dependencies.

```sh
cargo install cargo-generate --no-default-features
```

This will require the following dependencies on your system:

- pkg-config
- libgit2
- libssl-dev (this could also be named openssl)
- `pkg-config`
- `libgit2`
- `libssl-dev` (this could also be named openssl)

## Using `pacman` (Arch Linux)

Expand Down

0 comments on commit 54d6367

Please sign in to comment.