-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathlib.rs
51 lines (46 loc) · 1.66 KB
/
lib.rs
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
//
// Copyright (c) The yang-rs Core Contributors
//
// SPDX-License-Identifier: MIT
//
//! Rust bindings for the [libyang3] library.
//!
//! For raw FFI bindings for libyang3, see [libyang3-sys].
//!
//! [libyang3]: https://github.com/CESNET/libyang/tree/master
//! [libyang3-sys]: https://github.com/holo-routing/yang-rs/tree/master/libyang3-sys
//!
//! ## Design Goals
//! * Provide high-level bindings for libyang3 using idiomatic Rust
//! * Leverage Rust's ownership system to detect API misuse problems at compile
//! time
//! * Automatic resource management
//! * Zero-cost abstractions
//!
//! ## Feature flags
//! By default, yang-rs uses pre-generated FFI bindings and uses dynamic
//! linking to load libyang3. The following feature flags, however, can be used
//! to change that behavior:
//! * **bundled**: instructs cargo to download and build libyang3 from the
//! sources. The resulting objects are grouped into a static archive linked to
//! this crate. This feature can be used when having a libyang3 dynamic link
//! dependency isn't desirable.
//! * Additional build requirements: *cc 1.0*, *cmake 0.1*, a C compiler and
//! CMake.
//! * **use_bindgen**: generate new C FFI bindings dynamically instead of using
//! the pre-generated ones. Useful when updating this crate to use newer
//! libyang3 versions.
//! * Additional build requirements: *bindgen 0.68.0*
//!
//! ## Examples
//!
//! See <https://github.com/holo-routing/yang-rs/tree/master/examples>
mod error;
pub mod context;
pub mod data;
pub mod iter;
pub mod schema;
pub mod utils;
pub use crate::error::Error;
// Re-export the raw FFI bindings for convenience.
pub use libyang3_sys as ffi;