-
Notifications
You must be signed in to change notification settings - Fork 22
Home
Table of Contents
The following dependencies are required:
- git
- Rust: https://www.rust-lang.org/tools/install
- Zenoh: https://zenoh.io/docs/getting-started/installation/
git clone https://github.com/eclipse-zenoh-flow/zenoh-flow
cd zenoh-flow
cargo build --release --all-targets
This will produce the following:
-
zfctl
: (executable) a command-line interface (CLI) to interact with Zenoh-Flow. This will most likely be your entry point when interacting with Zenoh-Flow. -
libzenoh_plugin_zenoh_flow.so
: the plugin version of Zenoh-Flow that a Zenoh router can load. The actual name and extension of this artefact will change according to your operating system (e.g.libzenoh_plugin_zenoh_flow.dylib
on macOS).
If you would like to implement some nodes in Python, you have to perform additional steps that are detailed here: https://github.com/eclipse-zenoh-flow/zenoh-flow-python
Start by launching a Zenoh-Flow Daemon:
./target/release/zfctl daemon start alice
The above command will name that Daemon alice
.
Then check that you can query it by running:
./target/release/zfctl daemon list
If you see an output similar to this:
+----------------------------------+-------------------+
| Identifier | Name |
+======================================================+
| 39fec744aa9d91e58c0d2e9a69c55d76 | alice |
+----------------------------------+-------------------+
Then you have successfully installed Zenoh-Flow on your system!
Warning
In order to correctly load Zenoh-Flow as a Zenoh plugin, zenohd
must be at the same version as what is used in Zenoh-Flow. See the value in the Cargo.toml
file at the root of the Zenoh-Flow repository.
Failing to do so could result in sudden crashes when zenohd
will attempt to load the plugin due to ABI incompatibilities.
The first step is to inform the Zenoh router, on which we want to launch Zenoh-Flow as a plugin, of our intention.
To do so we need to modify the plugins
section of its configuration and add the following:
{
"plugins": {
"zenoh_flow": {
"name": "zenoh-flow-plugin-test",
}
}
}
💡 A complete, minimal, configuration can be accessed here.
The second step is to inform the Zenoh router on where to find the shared library object. A Zenoh router uses the value of the configuration parameter search_dirs
to look for libraries. To modify this value, either (i) use the command line option --plugin-search-dir
like so:
$ /path/to/zenohd --plugin-search-dir /path/to/zenoh-flow/target/release -c zenoh-config.json
Or (ii) modify the section plugins_loading
of the Zenoh configuration:
{
"plugins_loading": {
"search_dirs": ["/path/to/zenoh-flow/target/release"]
}
}
The last remaining step is to launch the Zenoh router that will in turn launch the Zenoh-Flow plugin.
$ /path/to/zenohd -c /path/to/zenoh-configuration.json
Note
The command above assumes that you have added to the zenoh-configuration.json
file the search_dirs
and plugins/zenoh_flow
sections.
You can alternatively do everything through command-line options like so:
$ /path/to/zenohd \
--cfg='plugins/zenoh_flow:{name:"zenoh-plugin-test"}' \
--plugin-search-dir /path/to/zenoh-flow/target/release/
The above command will name that Daemon zenoh-plugin-test
.
Then check that you can query it by running:
./target/release/zfctl daemon list
If you see an output similar to this:
+----------------------------------+-------------------+
| Identifier | Name |
+======================================================+
| 3c57ce9d2233fa939eaddf4f2c2bb61d | zenoh-plugin-test |
+----------------------------------+-------------------+
Then you have successfully installed and launched Zenoh-Flow as a Zenoh plugin on your system!