Skip to main content

vpp_plugin/
lib.rs

1#![warn(
2    missing_docs,
3    missing_copy_implementations,
4    clippy::undocumented_unsafe_blocks
5)]
6#![cfg_attr(docsrs, feature(doc_cfg))]
7
8//! # Framework for writing high-performance VPP plugins in Rust
9//!
10//! [VPP](https://wiki.fd.io/view/VPP/What_is_VPP%3F) is a high performance packet processing
11//! with support for a large number of features, and enables writing plugins to extend its
12//! functionality.
13//!
14//! This crate provides the core functionality for writing VPP plugins in Rust. It includes
15//! bindings to the VPP C API, as well as abstractions for writing VPP nodes, with the goal of
16//! having performance parity with C plugins for fast path packet processing.
17//!
18//! # Features
19//!
20//! The following features are available:
21//! - `process-node`: Enables infrastructure for using process nodes (using async/await) in VPP
22//!   plugins.
23//! - `experimental`: Used for functionality and types that aren't tested or are not part of the
24//!   stable API yet as aspects of them might still be under consideration. APIs conditional on
25//!   this feature may be added, changed or removed without the semantic versioning reflecting
26//!   this.
27
28pub mod bindings;
29#[doc(hidden)]
30pub mod macro_support;
31pub mod vlib;
32pub mod vlibapi;
33pub mod vnet;
34pub mod vppinfra;
35
36// Re-export macros for convenience
37#[cfg(feature = "process-node")]
38pub use vpp_plugin_macros::vlib_process_node;
39pub use vpp_plugin_macros::{
40    ErrorCounters, NextNodes, vlib_cli_command, vlib_init_function, vlib_node,
41    vlib_plugin_register, vnet_feature_init,
42};
43
44/// Re-exported for use by code generated by vpp-plugin-api-gen
45pub extern crate bitflags;