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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! # freerdp-sys
//!
//! Raw FFI bindings to [FreeRDP 3.x](https://github.com/FreeRDP/FreeRDP) —
//! a free, open-source implementation of the Remote Desktop Protocol (RDP).
//!
//! This crate provides low-level, unsafe Rust bindings generated via
//! [`bindgen`](https://crates.io/crates/bindgen). It is intended as a
//! foundational building block for higher-level safe Rust wrappers.
//!
//! ## Features
//!
//! | Feature | Default | Description |
//! |---------|---------|-------------|
//! | `vendored` | ✓ | Build FreeRDP from vendored source via CMake |
//! | `system` | | Link against a system-installed FreeRDP 3.x (pkg-config) |
//! | `generate-bindings` | | Generate bindings at build time (requires libclang) |
//!
//! ## Usage
//!
//! ```rust,no_run
//! use freerdp_sys::*;
//!
//! unsafe {
//! let settings = freerdp_settings_new(FREERDP_SETTINGS_INSTANCE_COUNT);
//! // ... configure settings ...
//! freerdp_settings_free(settings);
//! }
//! ```
//!
//! ## Vendored Build
//!
//! With the default `vendored` feature, FreeRDP is compiled from source during
//! `cargo build`. Ensure you have:
//!
//! - CMake ≥ 3.13
//! - A C compiler (gcc/clang)
//! - OpenSSL development headers
//! - zlib development headers
//!
//! The FreeRDP source lives in `vendor/FreeRDP` as a git submodule.
//!
//! ## System Linking
//!
//! Disable default features and enable `system`:
//!
//! ```toml
//! [dependencies]
//! freerdp-sys = { version = "0.1", default-features = false, features = ["system"] }
//! ```
//!
//! Requires FreeRDP 3.x development packages installed and discoverable via pkg-config.
//!
//! ## Safety
//!
//! All functions in this crate are `unsafe` FFI calls. Refer to the
//! [FreeRDP documentation](https://pub.freerdp.com/api/) for correct usage,
//! memory ownership, and threading constraints.
//!
//! ## License
//!
//! Licensed under MIT OR Apache-2.0 at your option.
// When `generate-bindings` is active, include the freshly generated bindings from OUT_DIR.
// Otherwise, include the pre-generated bindings committed to the repository.
include!;
pub use *;
/// Re-export the FreeRDP version components this crate was built against.