Skip to content

Commit 204b951

Browse files
committed
Update README.
1 parent e31d9e6 commit 204b951

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,16 @@ your own Rust project, you can install it using `cargo`:
2828
cargo install rsmgclient
2929
```
3030

31-
NOTE: The default OpenSSL path on Windows is `C:\Program Files\OpenSSL-Win64\lib`,
32-
if you would like to change that please provide `OPENSSL_LIB_DIR` env variable.
31+
**Windows Users**: If you encounter OpenSSL-related build issues, you can install OpenSSL via vcpkg:
32+
```bash
33+
vcpkg install openssl:x64-windows-static
34+
```
35+
Then set the environment variables:
36+
```bash
37+
set OPENSSL_LIB_DIR=C:\vcpkg\installed\x64-windows-static\lib
38+
set OPENSSL_INCLUDE_DIR=C:\vcpkg\installed\x64-windows-static\include
39+
set OPENSSL_STATIC=1
40+
```
3341

3442
### Building from Source
3543

@@ -51,15 +59,14 @@ cargo build
5159
cargo test
5260
```
5361

54-
On MacOS, the build will try to detect OpenSSL by using MacPorts or Homebrew.
62+
On MacOS, the build will automatically detect OpenSSL using MacPorts or Homebrew.
63+
64+
On Windows, the build supports multiple OpenSSL configurations:
65+
- **Recommended**: The build will automatically use vcpkg to install OpenSSL if available
66+
- **Manual**: You can provide custom OpenSSL paths using `OPENSSL_LIB_DIR` and `OPENSSL_INCLUDE_DIR` environment variables
67+
- **Default**: Falls back to `C:\Program Files\OpenSSL-Win64\` if no custom paths are provided
5568

56-
On Windows, `bindgen` requires `libclang` which is a part of LLVM. If LLVM is
57-
not already installed just go to the [LLVM
58-
download](https://releases.llvm.org/download.html) page, download and install
59-
`LLVM.exe` file (select the option to put LLVM on the PATH). In addition,
60-
default OpenSSL path is `C:\Program Files\OpenSSL-Win64\lib`, if you would like
61-
to change that please provide `OPENSSL_LIB_DIR` env variable during the build
62-
phase.
69+
`bindgen` requires `libclang` which is part of LLVM. On Windows, if LLVM is not installed, download it from the [LLVM download page](https://releases.llvm.org/download.html) and install the `LLVM.exe` file (make sure to select the option to add LLVM to PATH).
6370

6471
## Documentation
6572

0 commit comments

Comments
 (0)