openconnect-sys

Crates.ioopenconnect-sys
lib.rsopenconnect-sys
version0.1.5
sourcesrc
created_at2024-03-17 14:45:28.401938
updated_at2024-04-18 13:22:41.221671
descriptionRust bindings for OpenConnect
homepagehttps://github.com/hlhr202/Openconnect-RS
repositoryhttps://github.com/hlhr202/Openconnect-RS/tree/main/crates/openconnect-sys
max_upload_size
id1176557
size799,749
Genkagaku.GPT (hlhr202)

documentation

https://docs.rs/openconnect-sys

README

Build guide

Pre-request

according to the openconnect build guide, you should install the following packages as dependencies.

For Ubuntu

apt install libxml2
apt install zlib1g zlib1g-dev
apt install openssl libssl-dev
apt install liblz4-dev liblzma-dev
apt install pkg-config

For building tools (if you don't want to use the prebuilt openconnect):

apt install automake # for aclocal
apt install libtool # for libtoolize
apt install gettext # for msgfmt

For MacOS

brew install libxml2
brew install zlib
brew install openssl
brew install pkg-config

For building tools (if you don't want to use the prebuilt openconnect):

brew install automake # for aclocal
brew install libtool # for libtool
brew install gettext # for msgfmt

For Windows (MSYS2 MINGW64)

Download MSYS2

Switch rust toolchain to windows-gnu

rustup default stable-x86_64-pc-windows-gnu

You have to use MSYS2 MINGW64 shell to build the library for 64-bit Windows.

pacman -S base-devel mingw-w64-x86_64-toolchain
pacman -S automake
pacman -S libtool
pacman -S gettext
pacman -S autotools
pacman -S pkg-config

pacman -S openssl openssl-devel mingw-w64-x86_64-openssl
pacman -S libxml2 libxml2-devel mingw-w64-x86_64-libxml2
pacman -S libiconv libiconv-devel mingw-w64-x86_64-libiconv
pacman -S zlib zlib-devel mingw-w64-x86_64-zlib
pacman -S liblz4 liblz4-devel mingw-w64-x86_64-lz4
pacman -S liblzma liblzma-devel mingw-w64-x86_64-xz
pacman -S icu icu-devel mingw-w64-x86_64-icu

Related to prebuilt openconnect

By default, we use the prebuilt openconnect static lib, which is downloaded from sourceforge.

If you want to build the openconnect static lib when building the crate, you can add environment variable to your .cargo/config file.

[env]
OPENCONNECT_USE_PREBUILT = "false"

A further investigation of manual build can be found in MANUAL_BUILD.md.

Commit count: 0

cargo fmt