plctag_sys/lib.rs
1// plctag-rs
2//
3// a rust wrapper of libplctag, with rust style APIs and useful extensions.
4// Copyright: 2022, Joylei <leingliu@gmail.com>
5// License: MIT
6
7/*!
8# plctag-sys
9
10native libplctag binding
11
12[](https://crates.io/crates/plctag-sys)
13[](https://docs.rs/plctag-sys)
14[](https://github.com/joylei/plctag-rs/actions?query=workflow%3A%22build%22)
15[](https://github.com/joylei/plctag-rs/blob/master/LICENSE)
16
17## Build
18
19You can build from source or use pre-built binaries. It depends on how you set ENV variables.
20
21- Use pre-built binaries
22- Build from external source
23- Build from embedded source
24
25## Use pre-built binaries
26
27Download latest binary release of [libplctag](https://github.com/libplctag/libplctag/releases) and extract it to somewhere of your computer.
28
29Set environment variable `LIBPLCTAG_PATH` to the directory of extracted binaries.
30
31## Build from git submodules
32
33If environment variable `LIBPLCTAG_PATH` does not present, will build from git submodules [libplctag](https://github.com/libplctag/libplctag/).
34
35## Static build
36
37env `PLCTAG_STATIC`: use static build, true if the value is one of `1`, `true`, `on`, `yes`
38env `PLCTAG_DYNAMIC`: use dynamic build, true if the value is one of `1`, `true`, `on`, `yes`
39
40Will check if static build in the order of:
41`PLCTAG_STATIC, PLCTAG_DYNAMIC, rustflags: +crt-static`
42
43*/
44#![allow(non_upper_case_globals)]
45#![allow(non_camel_case_types)]
46#![allow(non_snake_case)]
47#![allow(dead_code)]
48
49include!(concat!(env!("OUT_DIR"), "/bindings.rs"));