summaryrefslogtreecommitdiff
path: root/plugins/warp/src/plugin.rs
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/warp/src/plugin.rs')
-rw-r--r--plugins/warp/src/plugin.rs20
1 files changed, 17 insertions, 3 deletions
diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs
index 16462f00..4364508b 100644
--- a/plugins/warp/src/plugin.rs
+++ b/plugins/warp/src/plugin.rs
@@ -116,9 +116,7 @@ fn load_network_container() {
background_task.finish();
}
-#[no_mangle]
-#[allow(non_snake_case)]
-pub extern "C" fn CorePluginInit() -> bool {
+fn plugin_init() -> bool {
Logger::new("WARP").with_level(LevelFilter::Debug).init();
// Register our matcher and plugin settings globally.
@@ -249,3 +247,19 @@ pub extern "C" fn CorePluginInit() -> bool {
true
}
+
+#[no_mangle]
+#[allow(non_snake_case)]
+#[cfg(feature = "demo")]
+pub extern "C" fn WarpPluginInit() -> bool {
+ plugin_init();
+ true
+}
+
+#[no_mangle]
+#[allow(non_snake_case)]
+#[cfg(not(feature = "demo"))]
+pub extern "C" fn CorePluginInit() -> bool {
+ plugin_init();
+ true
+}