diff --git a/DEFAULT_CONFIG.json5 b/DEFAULT_CONFIG.json5 index e4f3652d18..ec06dda811 100644 --- a/DEFAULT_CONFIG.json5 +++ b/DEFAULT_CONFIG.json5 @@ -404,12 +404,12 @@ // }, plugins: { - dds: { - __config__: "../zenoh-plugin-dds/config.json5", - __path__: [ - "../zenoh-plugin-dds/target/debug/libzenoh_plugin_dds.so", - ], - }, + //dds: { + // __config__: "../zenoh-plugin-dds/config.json5", + // __path__: [ + // "../zenoh-plugin-dds/target/debug/libzenoh_plugin_dds.so", + // ], + //}, example: { __path__: [ "target/debug/libzenoh_plugin_example.so", diff --git a/plugins/example-plugin/Cargo.toml b/plugins/example-plugin/Cargo.toml index 82cdeba6e5..a90c1f97ed 100644 --- a/plugins/example-plugin/Cargo.toml +++ b/plugins/example-plugin/Cargo.toml @@ -28,6 +28,9 @@ name = "zenoh_plugin_example" # This crate type will make `cargo` output a dynamic library instead of a rust static library crate-type = ["cdylib"] +[features] +crashable = ["zenoh/crashable"] + [dependencies] async-std = { workspace = true, features = ["default"] } clap = { workspace = true } diff --git a/plugins/example-plugin/src/lib.rs b/plugins/example-plugin/src/lib.rs index e74803d52d..9285f96065 100644 --- a/plugins/example-plugin/src/lib.rs +++ b/plugins/example-plugin/src/lib.rs @@ -48,13 +48,17 @@ impl Plugin for ExamplePlugin { // The first operation called by zenohd on the plugin fn start(name: &str, runtime: &Self::StartArgs) -> ZResult { - let dummy = runtime._dummy; - println!("dummy: {}", dummy); - eprintln!("edummy: {}", dummy); - info!("ldummy: {}", dummy); - if dummy { - panic!("FOOOO!!!!"); + + // panic!("panic"); + + #[cfg(feature="crashable")] + { + panic!("FOOOO!!!! : {}", runtime._dummy); } + info!("example started"); + println!("example started !"); + panic!("example started !!"); + let config = runtime.config.lock(); let self_cfg = config.plugin(name).unwrap().as_object().unwrap(); // get the plugin's config details from self_cfg Map (here the "storage-selector" property)