diff options
| author | har7an <99636919+har7an@users.noreply.github.com> | 2025-03-03 09:26:58 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-03 09:26:58 +0000 |
| commit | 736d43b138fea4e7bec6dfb6193e1370594886ff (patch) | |
| tree | d07ac56a57a7e6921faa916131b9f8e0787434f0 /zellij-server/src/plugins | |
| parent | fix(panes): various fixes for rendering stacked panes without pane frames (#4... (diff) | |
| download | sl0ppij-736d43b138fea4e7bec6dfb6193e1370594886ff.tar.gz sl0ppij-736d43b138fea4e7bec6dfb6193e1370594886ff.tar.xz sl0ppij-736d43b138fea4e7bec6dfb6193e1370594886ff.zip | |
fix(toolchain): Unbreak client startup
This reverts commit 9f900a7325304a06d9e0913a8e661d7bbc86ad04.
Diffstat (limited to 'zellij-server/src/plugins')
| -rw-r--r-- | zellij-server/src/plugins/plugin_loader.rs | 3 | ||||
| -rw-r--r-- | zellij-server/src/plugins/plugin_worker.rs | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/zellij-server/src/plugins/plugin_loader.rs b/zellij-server/src/plugins/plugin_loader.rs index 4a79ffb1..56ae6786 100644 --- a/zellij-server/src/plugins/plugin_loader.rs +++ b/zellij-server/src/plugins/plugin_loader.rs @@ -638,6 +638,7 @@ impl<'a> PluginLoader<'a> { .filter_map(|export| export.clone().into_func().map(|_| export.name())) { if function_name.ends_with("_worker") { + let plugin_config = self.plugin.clone(); let (mut store, instance) = self.create_plugin_instance_and_wasi_env_for_worker()?; @@ -648,7 +649,7 @@ impl<'a> PluginLoader<'a> { .call(&mut store, ()) .with_context(err_context)?; - let worker = RunningWorker::new(store, instance, &function_name); + let worker = RunningWorker::new(store, instance, &function_name, plugin_config); let worker_sender = plugin_worker(worker); workers.insert(function_name.into(), worker_sender); } diff --git a/zellij-server/src/plugins/plugin_worker.rs b/zellij-server/src/plugins/plugin_worker.rs index 635c8f50..3b630706 100644 --- a/zellij-server/src/plugins/plugin_worker.rs +++ b/zellij-server/src/plugins/plugin_worker.rs @@ -5,21 +5,29 @@ use wasmtime::{Instance, Store}; use zellij_utils::async_channel::{unbounded, Receiver, Sender}; use zellij_utils::async_std::task; use zellij_utils::errors::prelude::*; +use zellij_utils::input::plugins::PluginConfig; use zellij_utils::plugin_api::message::ProtobufMessage; use zellij_utils::prost::Message; pub struct RunningWorker { pub instance: Instance, pub name: String, + pub plugin_config: PluginConfig, pub store: Store<PluginEnv>, } impl RunningWorker { - pub fn new(store: Store<PluginEnv>, instance: Instance, name: &str) -> Self { + pub fn new( + store: Store<PluginEnv>, + instance: Instance, + name: &str, + plugin_config: PluginConfig, + ) -> Self { RunningWorker { store, instance, name: name.into(), + plugin_config, } } pub fn send_message(&mut self, message: String, payload: String) -> Result<()> { |
