Skip to content

Commit

Permalink
add vendored-openssl feature to allow embed openssl statically
Browse files Browse the repository at this point in the history
  • Loading branch information
ndusart committed Feb 2, 2024
1 parent 99f0bd2 commit 5d1e5b4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ edition = "2021"
authors = ["Nicolas Dusart <[email protected]>", "Freedelity"]
license = "MIT"

[features]
vendored-openssl = ["ssh2/vendored-openssl"]

[dependencies]
anyhow = "1.0"
clap = { version = "4.4", default-features = false, features = ["derive", "std", "help", "usage"] }
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ You can simply build this with the **Rust** toolchain (using **cargo** package m
cargo build --release
```

This build will be linked against the OpenSSL library of your system. If this makes an issue to deploy it on a machine with an incompatible version of OpenSSL, you can statically link OpenSSL in your binary by enabling the `vendored-openssl` feature (this will add ~4MB to the final binary):

```sh
cargo build --release --feature vendored-openssl
```

## License

This project is licensed under the [MIT license].
Expand Down

0 comments on commit 5d1e5b4

Please sign in to comment.