Zellij New WASM Plugin System
zellij.dev
zellij.dev
In the beginning I wa very entusiastic and switched from tmux to zellij on remote machines, but as I usually have btop running in a tab it would die in a day or two, so now I'm back to using tmux on remote machines and reserve zellij for local (and make sure I don't run btop in a tab).
Otherwise, I'll try your reproduction myself and will fix if I can reproduce. Thanks.
I will append a comment to the Microsoft GitHub issue mentioned above a little later.
I'm always running the latest zellij, but I'll start btop in a tab right away and see what happens.
I did mention it in https://github.com/zellij-org/zellij/issues/1625#issuecommen... and noticed the issue is still open, so I haven't tried btop in zellij since v0.36.0.
But I still use it all the time now — I found it so much easier to get up to speed with relative to tmux. And it's getting better all the time, so I'm happy to invest in it...
For WebAssembly plugins, I also wish they used Extism, which is kinda the de facto standard for this.
Ideally, I'd have my WM handle panes, layouts, etc. "Terminal multiplexing" seems to me to be misplacing client/UI concerns. Session persistence is the concern of the server, and multiplexing should be handled by ssh. However, getting the client terminals to coordinate nicely (e.g. reattaching to the appropriate sessions, opening new terminals in the same remote working directory) require more sophisticated clients than exist currently (to my knowledge).
Does anyone feel similarly? Anyone have a setup that approximates what I'm looking for?
There is also wezterm with its own mux server implementation: https://wezfurlong.org/wezterm/multiplexing.html
Does exactly what you describe with a minimum of fuss.
It does not offer persistence by itself, but iirc there are server components in wezterm which might give you reattach able sessions.
Also I want to point out the way this is being handled in GH issue 575.
It's taking time, but the politeness of many people, specially @imsnif is out of this world.
This will be killer and it's ready, because one can freely create the tabs and panes designs while working, then dumping and customizing more later.
I'm learning rust myself now, and projects and people like this encourages me even more. (Even with the rust foundation issues that happened)
Thanks all!
For sure i see need for some kind of plugin "package manager" here. on one hand this would help with discoverability of plugins, but more importantly with updates. checking each of plugin every so often isn't convinient and in such systems i usually check once or twice a year if there is any update.
Here are my configs for anyone interested — more modal than the default: https://gist.github.com/max-sixty/6be7225ddc0a9cecb7203d5f7f...
For example, they have implemented a file explorer as a plugin. But this means you can only use it when Zellij is available, and not as a standard tool on another system. This reduces flexibility and means you need different tools in different contexts.
I'd love to be corrected, but I can't think of any good reason why a special file explorer needs to exist, just to be coded to this plugin standard, instead of as a normal terminal program.
A few reasons:
1. Ease of distribution - distributing a precompiled wasm blob is immensely easier than distributing an application
2. Sandboxing - both on the fs level and regarding special permissions, which brings us to
3. Stronger capabilities - you can use the terminal workspace around you by manipulating panes, tabs and other plugins, creating a workspace experience rather than a single app
4. More knowledge about the application - want to trigger when the user enters a certain folder? When a certain pane is focused? When certain text appears on screen?
5. Composability - integrate with other plugins to render a dashboard-like experience rather than a single app that a user needs to manually compose
While some of these are also achievable with native apps, I have found that if you give users (developers in this case) opinionated defaults that make integration easier - you'll get more people building more interesting things. Even if they technically can implement them all on their own.
The precompiled WASM blob could be the (console) application (which runs in e.g. Deno/Node or Wasmedge/Wasmtime/...).
For one, since plugin permissions seem to be on the roadmap, users can expect to be able to write and run third-party code with a bit more confidence than if it were just another unix process.
Looking further down the line, imagine a pluggable web/native frontend for Zellij. At its most basic level of operation, it would still serve as a full terminal multiplexer, but it would also have the potential to do anything the containing runtime supports (render images, play video, render rich inputs/controls).
I wasn't imagining this before, but I kind of am now...
Great application and I’m looking forward to seeing the plugin ecosystem grow. Thanks to the maintainers and contributors for their work.
1. One pane with my UDP benchmark between two of my machines
2. One pane with my UDP benchmark between two other machines
3. One pane which is a normal terminal where I'm going to make my changes
So what I'd do is make my changes in normal terminal, then switch over to #1 and hit Enter and it runs, then switch over to #2 and it runs. I don't want to write a specific plugin for my UDP benchmark tool. I want a plugin that takes a pre-baked command (with flags and arguments) and turns it into a pane that I can just switch to and hit Enter.
Honestly, I currently use a tiling terminal emulator (iTerm2) and it's not bad, but I have to hit Up+Enter and then that's overlapping with the history of whatever shell is on that machine.
You can either open them through the cli with "zellij run -- <your command>" when inside a zellij session, or set them up in a layout so it opens all of the ones you want in a new tab arranged the way you like.
I've since grown fond of zellij's locked mode which hides all keybindings behind a Ctrl+G toggle. That behaves more like vim modes than the awkward Ctrl+B in tmux.
I'd definitely have wanted to outsource this though if we didn't have the infrastructure in place already. Extism seems solid.
First: wasm is the perfect plug-in language, as it provides a high level of isolation and therefore security for the host app.
Second: the promise of wasm is that you can write it in any language. I think this is compelling for any application that seeks for extensibility.
Wether all this is worth the effort is probably the actual question. Maybe we will be surprised by killer plugins that wouldn’t be possible with regular plug-in systems…
It's less "this wouldn't be possible" and more the fact that the existence of plugins that are sandboxed and access-permissioned makes me far more likely to seek out and install plugins in the first place, since it lowers the trust barrier. It's the same reason why I browse random websites freely while also being loathe to install random binaries on my computer. Being language-agnostic is just icing on the cake.
WASM doesn't mean this has to be true, but it could be.
In any case I wonder what's the need for try to push Wasmer down. Here are your previous comments, all hateful against Wasmer on different announcements:
1. https://news.ycombinator.com/item?id=36128284 (on WASIX launch)
2. https://news.ycombinator.com/item?id=33835683 (on WAI bindings)
Honest question: are you related to the Bytecode Alliance at all? (I saw a comment from you in HN promoting a company from that alliance)