Skip to content

Building

locka99 edited this page Nov 22, 2017 · 3 revisions

Setup

  1. Install latest stable rust, e.g. using rustup
  2. 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

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..

Windows

OpenSSL is more of a problem for Windows. This is the recommended way to build OPC UA for Rust.

  1. Install the stable-x86_64-pc-windows-gnu Rust toolchain via rustup
  2. 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%

MSVC

Refer to the rust-openssl project (link above) but as you will see the process is more complex.

Mac OS X

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.

Clone this wiki locally