8 releases (4 breaking)

new 0.11.0-rc.2 Apr 30, 2024
0.10.1-rc Dec 20, 2023
0.10.0-rc Sep 26, 2023
0.7.2-rc Jun 6, 2023
0.5.0-beta.9 Nov 24, 2021

#1322 in Network programming

Download history 1785/week @ 2024-01-08 2519/week @ 2024-01-15 5514/week @ 2024-01-22 6375/week @ 2024-01-29 8316/week @ 2024-02-05 9721/week @ 2024-02-12 4468/week @ 2024-02-19 5681/week @ 2024-02-26 6033/week @ 2024-03-04 4817/week @ 2024-03-11 5889/week @ 2024-03-18 4640/week @ 2024-03-25 4826/week @ 2024-04-01 6837/week @ 2024-04-08 6994/week @ 2024-04-15 4790/week @ 2024-04-22

23,520 downloads per month
Used in 29 crates (9 directly)

EPL-2.0 OR Apache-2.0

460KB
10K SLoC

⚠️ WARNING ⚠️

This crate is intended for Zenoh's internal use.


lib.rs:

The plugin infrastructure for Zenoh.

To build a plugin, implement Plugin.

If building a plugin for zenohd, you should use the types exported in zenoh::plugins to fill Plugin's associated types.
To check your plugin typing for zenohd, have your plugin implement zenoh::plugins::ZenohPlugin

Plugin is a struct which implements the Plugin trait. This trait has two associated types:

  • StartArgs: the type of the arguments passed to the plugin's start function.
  • Instance: the type of the plugin's instance.

The actual work of the plugin is performed by the instance, which is created by the start function.

Plugins are loaded, started and stopped by PluginsManager. Stopping pluign is just dropping it's instance.

Plugins can be static and dynamic.

Static plugin is just a type which implements Plugin trait. It can be added to PluginsManager by PluginsManager::add_static_plugin method.

Dynamic pluign is a shared library which exports set of C-repr (unmangled) functions which allows to check plugin compatibility and create plugin instance. These functiuons are defined automatically by declare_plugin macro.

Dependencies

~16–29MB
~421K SLoC