aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/plugins/plugin_worker.rs (follow)
Commit message (Collapse)AuthorAge
* Purge `async_std` from the codebase (#4672)har7an2026-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(utils): Replace `async_std` with `tokio` removing an entire async runtime from the dependency tree. `tokio` has previously been required by `wasmtime` in any case, and the version of async_std we used was ancient (1.3) and relied on unstable features. * build(server): Remove `async_std` from the codebase and replace it with `tokio` instead, which is already used by `zellij-utils` and `wasmtime`. * build(server): Remove dead dependency. * fix: Don't keep an async runtime in the `zellij-utils` subcrate but prefer to reuse an existing runtime from a caller instead. If no such runtime exists, create an ephemeral runtime on the current thread to run async tasks instead. Ideally, the functions needing the async task would be async themselves, but these are called by the `Layout` code based on a `ClientMsg`, and the code handling this currently lives in `zellij-utils` and is sync itself. So, for the time being, there is no way around this runtime requirement without a huge refactoring. * refactor(server): Unclutter async tasks in a few cases where either blocking code was called in an (unnecessary) async task or an entire thread was spawned to block on the result of an async task. * docs(CHANGELOG): Mention PR 4672 * fix(server): Don't terminate when killing a panes children fails but log the error and continue instead. * feat: Add config option for number of async tasks to spawn so users on machines with few resources can configure a task limit without requiring recompilation.
* Migrate from wasmtime to wasmi (#4449)Aram Drevekenin2025-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * fix stdio and host folder mounting * some memory usage optimizations * fix plugin tests * remove unused plugin cache * fix docker-compose for e2e tests when running locally * rustfmt * initial pinned executor implementation * EXPERIMENT: add jemalloc * initial dynamic pinned threadpool * cleanups and experiments * keep state on execution threads * reintroduce memory cache * add wasmi engine to executor threads * load plugins for new clients on the relevant executor thread * only show loading indication of loading for more than 0.4 secs * fix anonymous plugin loading without client id * refactor lots of stuff * update snapshots * tests for pinned executor * remove jemalloc * fix stderr from plugins * cleanups * rustfmt * cleanups * fix endless loading for additinal attachments * more cleanups * remove singlepass feature * fix displaying plugin permission message * render optimizations * always render for tests * rustfmt * optimize release build for wasmi * fixes for multiple client plugin loading * fix frame rendering for multiple clients * rustfmt * fix loading background plugins and e2e event ordering change * rustfmt * account for races in the pin_floating_panes e2e test * docs(changelog): add PR
* build: Don't re-export foreign crates in utils (#4087)har7an2025-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(utils): Don't use reexported dependency for internal code, but use the dependency directly. * build(client): Don't use re-exports from `utils` but turn `zellij-utils` dependencies into shared workspace dependencies instead and specify those in `Cargo.toml` explicitly. This gives a much better overview of what component in zellij uses which crates. The previous approach hides a lot of this information since it looks like crates are used in a single place where this isn't actually true. * deps(tile): Don't use re-exports from zellij-utils. * build(zellij): Don't use re-exports from zellij-utils. * build(server): Don't use re-exports from zellij-utils. * build(utils): Don't re-export foreign crates. * docs: Update Changelog with PR #4087. * style: Apply rustfmt. * style: Apply rustfmt. * build(e2e): Don't use re-export from zellij-utils. * test: Restore e2e tests. * style: Apply more formatting.
* Fix compiler warnings (#4053)har7an2025-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * chore(cargo): Update dependencies for xtask subcommand to remove warnings about unknown compiler attributes. * deps(xtask): Remove `lazy_static` as dependency, since the code we need can now be expressed using rusts `std` builtin types. * fix(xtask): Hide deprecated args so the compiler doesn't complain about dead code any more. * fix(xtask): Remove needless borrow. * fix: Remove dead code across the codebase, as discovered by the rust compiler. * fix(server): Log previously ignored errors. * fix(xtask): Remove needless `format!` calls. * fix(xtask): Remove superfluous return statement. * fix(client): Remove unused enum variant from `ClientInstruction` and all code attached to it. * fix(server): Restore functions needed in tests. * chore: Apply rustfmt. * fix(server): Add missing code. * fix: Remove leftover warnings. * CHANGELOG: Add MR #4026. * fix(xtask): Pin `xshell` to version 0.2.2 because release 0.2.3 changed the way stdin is handled, breaking interactive command invocations (such as we use).
* fix(toolchain): Unbreak client startuphar7an2025-03-03
| | | This reverts commit 9f900a7325304a06d9e0913a8e661d7bbc86ad04.
* Fix compiler warnings (#4026)har7an2025-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * chore(cargo): Update dependencies for xtask subcommand to remove warnings about unknown compiler attributes. * deps(xtask): Remove `lazy_static` as dependency, since the code we need can now be expressed using rusts `std` builtin types. * fix(xtask): Hide deprecated args so the compiler doesn't complain about dead code any more. * fix(xtask): Remove needless borrow. * fix: Remove dead code across the codebase, as discovered by the rust compiler. * fix(server): Log previously ignored errors. * fix(xtask): Remove needless `format!` calls. * fix(xtask): Remove superfluous return statement. * fix(client): Remove unused enum variant from `ClientInstruction` and all code attached to it. * fix(server): Restore functions needed in tests. * chore: Apply rustfmt. * fix(server): Add missing code. * fix: Remove leftover warnings. * CHANGELOG: Add MR #4026.
* dependencies: switch from Wasmer to Wasmtime (#3349)bjorn32024-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove ForeignFunctionEnv wrapper around PluginEnv This will enable PluginEnv to be the Store context when migrating to Wasmtime. * Pass PluginEnv by value to load_plugin_instance This will allow removing the Clone impl from PluginEnv when migrating to Wasmtime as required by the missing Clone impl on Wasmtime's WasiCtx. * Avoid passing a Store around when an Engine is enough * Pass PluginEnv to the wasi read/write functions Wasmtime requires storing the read/write end of the pipe outside of the WasiCtx. Passing PluginEnv to these functions allows storing them in the PluginEnv. * Migrate to Wasmtime * Switch from wasi-common to wasmtime-wasi * Reduce verbosity of wasmtime_wasi logs * Increase startup delay To wait for all plugins to be compiled. * Disable some wasmtime features * Update to Wasmtime 21.0.1
* feat(plugins): upgrade wasmer to 3.1.1 (#2706)Thomas Linford2023-09-27
| | | | | | | upgrade wasmer to 3.1.1 - last version with wasmer-wasi - refactor to satisfy &mut Store requirement to call wasm functions
* feat(plugins): use protocol buffers for serializing across the wasm boundary ↵Aram Drevekenin2023-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#2686) * work * almost done with command protobuffers * done translating command data structures * mid transferring of every command to protobuff command * transferred plugin_command.rs, now moving on to shim.rs * plugin command working with protobufs * protobuffers in update * protobuf event tests * various TODOs and comments * fix zellij-tile * clean up prost deps * remove version mismatch error * fix panic * some cleanups * clean up event protobuffers * clean up command protobuffers * clean up various protobufs * refactor protobufs * update comments * some transformation fixes * use protobufs for workers * style(fmt): rustfmt * style(fmt): rustfmt * chore(build): add protoc * chore(build): authenticate protoc
* feat(wasm-plugin-system): major overhaul and some goodies (#2510)Aram Drevekenin2023-06-07
* strider resiliency * worker channel prototype * finalized ui * show hide plugin * fs events to plugins * tests for events and new screen instructions * various refactoringz * report plugin errors instead of crashing zellij * fix plugin loading with workers * refactor: move watch filesystem * some fixes and refactoring * refactor(panes): combine pane insertion logic * refactor(screen): launch or focus * refactor(pty): consolidate default shell fetching * refactor: various cleanups * initial refactoring * more initial refactoring * refactor(strider): search * style(fmt): rustfmt * style(pty): cleanup * style(clippy): ok clippy * style(fmt): rustfmt