Rust bindings for the libyang2 library.
For raw FFI bindings for libyang2, see libyang2-sys.
- Provide high-level bindings for libyang2 using idiomatic Rust
- Leverage Rust’s ownership system to detect API misuse problems at compile time
- Automatic resource management
- Zero-cost abstractions
By default, yang2-rs uses pre-generated FFI bindings and uses dynamic linking to load libyang2. The following feature flags, however, can be used to change that behavior:
- bundled: instructs cargo to download and build libyang2 from the
sources. The resulting objects are grouped into a static archive linked to
this crate. This feature can be used when having a libyang2 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
- Additional build requirements: bindgen 0.55.0
pub use libyang2_sys as ffi;
- YANG context.
- YANG instance data.
- YANG iterators.
- YANG schema data.
- Enum listing possible errors from yang2-rs.