-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zenoh plugins statically linked in a zenoh app #89
Comments
The current design using 2 Conditional compilation of The most appropriate solution seems to follow the design suggested in https://michael-f-bryan.github.io/rust-ffi-guide/dynamic_loading.html:
|
Implemented by #114. |
Currently (v0.5.0-beta.8) the zenoh plugins are dynamic libraries that are loaded by
zenohd
at startup.They just must implement 2
#[no_mangle]
functions:Now we would like to be able to use the zenoh plugins in any zenoh Rust application, but in a static way (i.e. just declaring the plugins in the application's cargo.toml and calling them explicitly in the main() operation).
Use case:
The zenoh-dds-plugin can be built as a standalone zenoh application named
zenoh-bridge-dds
.We would like to administrate it at runtime in the same way as
zenohd
: via an admin space accessible through the REST API. The REST API is implemented as a zenoh plugin. But we don't want thezenoh-bridge-dds
to have the ability to dynamically load any plugin. The solution is to statically linkzenoh-bridge-dds
with the zenoh-rest plugin.And as the code of the DDS/zenoh bridge itself should eventually be also a zenoh plugin (to be loadable by
zenohd
), thezenoh-bridge-dds
will finally just by a main program starting the 2 plugins that are linked in static.The text was updated successfully, but these errors were encountered: