Skip to content

Commit

Permalink
chore: renamed no_mangle feature to dynamic_plugin (#1010)
Browse files Browse the repository at this point in the history
* chore: renamed no_mangle feature to dynamic_plugin

Signed-off-by: gabrik <[email protected]>

* fix: wrong find and replace fixed

Signed-off-by: gabrik <[email protected]>

---------

Signed-off-by: gabrik <[email protected]>
  • Loading branch information
gabrik authored May 3, 2024
1 parent 7a47445 commit f5195c0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions plugins/zenoh-backend-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-backend-example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions plugins/zenoh-plugin-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions plugins/zenoh-plugin-rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-rest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fn response(status: StatusCode, content_type: impl TryInto<Mime>, body: &str) ->
builder.build()
}

#[cfg(feature = "no_mangle")]
#[cfg(feature = "dynamic_plugin")]
zenoh_plugin_trait::declare_plugin!(RestPlugin);

pub struct RestPlugin {}
Expand Down
4 changes: 2 additions & 2 deletions plugins/zenoh-plugin-storage-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-storage-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down

0 comments on commit f5195c0

Please sign in to comment.