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