-
Notifications
You must be signed in to change notification settings - Fork 141
Building
- Install latest stable rust, e.g. using
rustup
- Install gcc and OpenSSL development libs & headers.
Detailed advice for installing OpenSSL is described in the rust-openssl
project which is here.
Below is a summary of that information.
Linux this should be straightforward providing you have installed OpenSSL packages openssl
and openssl-dev
/ openssl-devel
according to your dist and package management system..
OpenSSL is more of a problem for Windows. This is the recommended way to build OPC UA for Rust.
- Install the
stable-x86_64-pc-windows-gnu
Rust toolchain viarustup
- Install MSYS2 64-bit. Read the instructions on the site especially on updating to the
latest packages via
pacman -Syuu
.
Once MSYS2 has installed & updated you must install the MingW 64-bit compiler toolchain and OpenSSL packages.
Open a shell onto your new MSYS environment and type:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-pkg-config openssl-devel
Now ensure that these ensure both Rust and MinGW64 binaries are on your normal cmd.exe PATH and you should be ready:
set PATH=C:\msys64\mingw64\bin;C:\Users\MyName\.cargo\bin;%PATH%
Refer to the rust-openssl
project (link above) but as you will see the process is more complex.
NB: This advice is untested but it should be a matter of installing OpenSSL headers and libs:
brew install openssl
And then building per normal.