From f5195c04c403058c8aa1537b6a539037d476e649 Mon Sep 17 00:00:00 2001 From: Gabriele Baldoni Date: Fri, 3 May 2024 14:12:09 +0000 Subject: [PATCH] chore: renamed no_mangle feature to dynamic_plugin (#1010) * chore: renamed no_mangle feature to dynamic_plugin Signed-off-by: gabrik * fix: wrong find and replace fixed Signed-off-by: gabrik --------- Signed-off-by: gabrik --- plugins/zenoh-backend-example/Cargo.toml | 4 ++-- plugins/zenoh-backend-example/src/lib.rs | 2 +- plugins/zenoh-plugin-example/Cargo.toml | 4 ++-- plugins/zenoh-plugin-example/src/lib.rs | 2 +- plugins/zenoh-plugin-rest/Cargo.toml | 4 ++-- plugins/zenoh-plugin-rest/src/lib.rs | 2 +- plugins/zenoh-plugin-storage-manager/Cargo.toml | 4 ++-- plugins/zenoh-plugin-storage-manager/src/lib.rs | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/zenoh-backend-example/Cargo.toml b/plugins/zenoh-backend-example/Cargo.toml index eab4e8edb3..5ca4d3096b 100644 --- a/plugins/zenoh-backend-example/Cargo.toml +++ b/plugins/zenoh-backend-example/Cargo.toml @@ -20,8 +20,8 @@ edition = { workspace = true } publish = false [features] -default = ["no_mangle", "zenoh/default"] -no_mangle = [] +default = ["dynamic_plugin", "zenoh/default"] +dynamic_plugin = [] [lib] name = "zenoh_backend_example" diff --git a/plugins/zenoh-backend-example/src/lib.rs b/plugins/zenoh-backend-example/src/lib.rs index 602d29f375..aef889c64e 100644 --- a/plugins/zenoh-backend-example/src/lib.rs +++ b/plugins/zenoh-backend-example/src/lib.rs @@ -26,7 +26,7 @@ use zenoh_backend_traits::{ use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin}; use zenoh_result::ZResult; -#[cfg(feature = "no_mangle")] +#[cfg(feature = "dynamic_plugin")] zenoh_plugin_trait::declare_plugin!(ExampleBackend); impl Plugin for ExampleBackend { diff --git a/plugins/zenoh-plugin-example/Cargo.toml b/plugins/zenoh-plugin-example/Cargo.toml index ce12dbf18e..7cb0ad66f6 100644 --- a/plugins/zenoh-plugin-example/Cargo.toml +++ b/plugins/zenoh-plugin-example/Cargo.toml @@ -20,8 +20,8 @@ edition = { workspace = true } publish = false [features] -default = ["no_mangle", "zenoh/default", "zenoh/unstable", "zenoh/plugins"] -no_mangle = [] +default = ["dynamic_plugin", "zenoh/default", "zenoh/unstable", "zenoh/plugins"] +dynamic_plugin = [] [lib] # When auto-detecting the "example" plugin, `zenohd` will look for a dynamic library named "zenoh_plugin_example" diff --git a/plugins/zenoh-plugin-example/src/lib.rs b/plugins/zenoh-plugin-example/src/lib.rs index 2b3450f804..304a3c6338 100644 --- a/plugins/zenoh-plugin-example/src/lib.rs +++ b/plugins/zenoh-plugin-example/src/lib.rs @@ -32,7 +32,7 @@ use zenoh_result::{bail, ZResult}; pub struct ExamplePlugin {} // declaration of the plugin's VTable for zenohd to find the plugin's functions to be called -#[cfg(feature = "no_mangle")] +#[cfg(feature = "dynamic_plugin")] zenoh_plugin_trait::declare_plugin!(ExamplePlugin); // A default selector for this example of storage plugin (in case the config doesn't set it) diff --git a/plugins/zenoh-plugin-rest/Cargo.toml b/plugins/zenoh-plugin-rest/Cargo.toml index 8d88368643..989bd1b86d 100644 --- a/plugins/zenoh-plugin-rest/Cargo.toml +++ b/plugins/zenoh-plugin-rest/Cargo.toml @@ -24,8 +24,8 @@ categories = ["network-programming", "web-programming::http-server"] description = "The zenoh REST plugin" [features] -default = ["no_mangle", "zenoh/default", "zenoh/unstable", "zenoh/plugins"] -no_mangle = [] +default = ["dynamic_plugin", "zenoh/default", "zenoh/unstable", "zenoh/plugins"] +dynamic_plugin = [] [lib] name = "zenoh_plugin_rest" diff --git a/plugins/zenoh-plugin-rest/src/lib.rs b/plugins/zenoh-plugin-rest/src/lib.rs index 459df5c998..aff09f7198 100644 --- a/plugins/zenoh-plugin-rest/src/lib.rs +++ b/plugins/zenoh-plugin-rest/src/lib.rs @@ -189,7 +189,7 @@ fn response(status: StatusCode, content_type: impl TryInto, body: &str) -> builder.build() } -#[cfg(feature = "no_mangle")] +#[cfg(feature = "dynamic_plugin")] zenoh_plugin_trait::declare_plugin!(RestPlugin); pub struct RestPlugin {} diff --git a/plugins/zenoh-plugin-storage-manager/Cargo.toml b/plugins/zenoh-plugin-storage-manager/Cargo.toml index 1e37093a78..058722965f 100644 --- a/plugins/zenoh-plugin-storage-manager/Cargo.toml +++ b/plugins/zenoh-plugin-storage-manager/Cargo.toml @@ -24,8 +24,8 @@ categories = { workspace = true } description = "The zenoh storages plugin." [features] -default = ["no_mangle", "zenoh/default", "zenoh/unstable", "zenoh/plugins"] -no_mangle = [] +default = ["dynamic_plugin", "zenoh/default", "zenoh/unstable", "zenoh/plugins"] +dynamic_plugin = [] [lib] name = "zenoh_plugin_storage_manager" diff --git a/plugins/zenoh-plugin-storage-manager/src/lib.rs b/plugins/zenoh-plugin-storage-manager/src/lib.rs index 2c281144ce..e0529eff7e 100644 --- a/plugins/zenoh-plugin-storage-manager/src/lib.rs +++ b/plugins/zenoh-plugin-storage-manager/src/lib.rs @@ -52,7 +52,7 @@ mod memory_backend; mod replica; mod storages_mgt; -#[cfg(feature = "no_mangle")] +#[cfg(feature = "dynamic_plugin")] zenoh_plugin_trait::declare_plugin!(StoragesPlugin); pub struct StoragesPlugin {}