16 ms·
Zellij New WASM Plugin System
- deleted 3y ago[deleted]
- tux1968 3y agoIt seems odd to distinguish between a plugin and a program running in a terminal pane. This seems to imply you must reimplement all such functionality as a new plugin, instead of just running your preferred tool, as usual, in a terminal window. 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.
- imsnif 3y agoGood question! 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.
- ReleaseCandidat 3y ago> 1. Ease of distribution - distributing a precompiled wasm blob is immensely easier than distributing an application The precompiled WASM blob could be the (console) application (which runs in e.g. Deno/Node or Wasmedge/Wasmtime/...).
- mpalmer 3y agoMaybe you're focusing too closely on the specific example. It's interesting to me in the large for sure. 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...
- imbnwa 3y agoMore interested in when they'll implement concurrent, switchable sessions, one of the main reasons one would continue to use tmux, but this is nice development
- kibwen 3y agoBecause it's not immediately obvious, Zellij is a terminal multiplexer like tmux or GNU screen, whose distinguishing feature is that it comes with more built-in functionality, has a more discoverable UI, and a more opinionated/modern default configuration while still being highly customizable (as demonstrated in the OP). https://github.com/zellij-org/zellij https://github.com/zellij-org/zellij
- Timon3 3y agoHOT DAMN! Over the last few weeks I've wished almost daily I was proficient in tmux, but it's annoying to get started in because you have to look up EVERYTHING. I just tried Zellij (they have a "try without installing" command on their website) and it's exactly what I wanted Termux to be. Thank you so much for this comment!
- imbnwa 3y agoIndeed, for someone new to terminal multiplexing, its the superior UX, its just missing some advanced things tmux does, but which are being worked on
- wetpaws 3y ago[dead]
- sinfulprogeny 3y agoWould you mind giving an example of what you're thinking of?
- interlinked 3y agoToo bad it isn't a drop in replacement for tmux because of memory usage. There are memory leaks and even without that the base memory uses is a couple hundred megabytes. Tmux on the other hand, consumes only tens of megabytes of memory.
- imsnif 3y ago
- SpriglyElixir12 3y agoWhy do terminal applications need a WASM runtime? I feel like I'm not really understanding something fundamental about WASM.
- voigt 3y agoI do understand why people try this approach: 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…
- kibwen 3y ago> 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.
- Already__Taken 3y agoWasm has the promise to be a single target for your plugins that could be written in node/rust/python and the consumer won't have to have that specific version of python installed. That and the possibility to sandbox a plugin so my repl function can't also upload my ssh keys would be nice. WASM doesn't mean this has to be true, but it could be.
- baq 3y agoTerminal is just UI. It’s completely orthogonal to WASM.
- da39a3ee 3y agoYou might be missing the fact that WASM nowadays doesn't necessarily have anything to do with web browsers. It was initially designed for running in web browsers, but in the last few years there's been a lot of activity surrounding embedding WASM runtimes in processes other than web browsers. Mostly the idea is for it to be a way to execute untrusted / customer code (e.g. "plugins") with sophisticated sandboxing, etc.
- rychco 3y agoThis looks cool, I’ll use it as an excuse to try zellij & writing some wasm.
- maximilianroos 3y agoBig fan of Zellij! Here are my configs for anyone interested — more modal than the default: https://gist.github.com/max-sixty/6be7225ddc0a9cecb7203d5f7fb4c8d3 https://gist.github.com/max-sixty/6be7225ddc0a9cecb7203d5f7f...
- landr0id 3y agoI tried Zellij a while ago (year+?) and wasn’t a huge fan. After some major updates I tried it again and it’s become my daily driver. Great application and I’m looking forward to seeing the plugin ecosystem grow. Thanks to the maintainers and contributors for their work.
- renewiltord 3y agoIt looks pretty cool. Is there a plugin that is just "convert this program into a plugin"? i.e. say I'm doing some networking set up and I want to check whether what I'm doing is improving or reducing effective performance. I would like: 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.
- imsnif 3y agoHi, Zellij has this feature. Please check out command panes: https://zellij.dev/documentation/zellij-run.html https://zellij.dev/documentation/zellij-run.html 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.
- renewiltord 3y agoAbsolutely perfect, mate. Thank you.
- imsnif 3y agoSure thing! Btw, plugins can also open these command panes, this is how the multitask "mini-ci" plugin works.
- colordrops 3y agoStarting to look like a text based window manager from the early 80s.
- Szpadel 3y agoI was checking it like a year ago and it was cool but lacked some functionalities that i relied on daily basis (in comparison with tmux). I'm sure that some of those could be already implemented but plugins could probably fulfill rest of those. 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.
- scarmig 3y agoHijacking this for a question I've been wondering about. For context, I'm a long-time tmux user who spends 90% of my time in remote shells. 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?
- dmytrish 3y ago`wezterm ssh` uses ssh the way you describe it. It does not offer persistence by itself, but iirc there are server components in wezterm which might give you reattach able sessions.
- Szpadel 3y agoI'm using resurrect tmux plugin configured to rerun ssh commands, it's not perfect as it's not restoring remote session, but at least you have session open to right host in pane that you expect with scroll history.
- JonChesterfield 3y agoEmacs. Runs as a server, stays alive when clients drop. Window management on keyboard. Tramp mode is great. But I'm sure you've heard this already :)
- oandrew 3y agoIterm2 has tmux control mode support that enables somewhat native ui: https://iterm2.com/documentation-tmux-integration.html https://iterm2.com/documentation-tmux-integration.html There is also wezterm with its own mux server implementation: https://wezfurlong.org/wezterm/multiplexing.html https://wezfurlong.org/wezterm/multiplexing.html
- dansteen 3y agoMosh is an amazing tool - https://mosh.org/ https://mosh.org/ Does exactly what you describe with a minimum of fuss.
- nilslice 3y agoVery cool! As a wasm fan, I'm excited to see this and really appreciate the detailed write-up. As a maintainer of Extism[0] (a wasm plugin system framework) I'm curious if our project came up in your research for this, and if so, what is missing or kept you from considering it as a solution? https://github.com/extism/extism https://github.com/extism/extism
- imsnif 3y agoI'm pretty sure our plugin system predates your project (it's been around since before our beta was released in 2021, we've just given it the attention it deserved right now). I'd definitely have wanted to outsource this though if we didn't have the infrastructure in place already. Extism seems solid.
- nilslice 3y agoAh you are right indeed! Well, great minds think alike then I'd say ;) Love zellij, fantastic work.
- rodrigodlu 3y agoAwesome! I will be sold forever when something similar to tmux ressurect is available. 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!
- IshKebab 3y agoDoes this use Extism?
- mmgutz 3y agoAnd for those who are tmux users, zellij can be configured to be more space efficient, ie reduce borders to a single line. There are even tmux bindings. 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.
- mistahchris 3y agolocked mode is my fav as well. I used it to re-make a DoomEmacs-like workspace with helix.
- phero_cnstrcts 3y agoIs it possible to remove the session name and the text that says „zellij“? They take up too much space.
- mmgutz 3y ago100% Agree. Unfortunately no. They say it's a way to promote their small project.
- kibwen 3y agoIf it's bothersome, building a custom copy of the project looks to be as simple as `git clone` and `cargo build`.
- imsnif 3y agoThe session name yes, the branding no. You can create a custom plugin though instead of the built-in UI ones and render whatever you like...
- yewenjie 3y agoZellij has had a plugin system for more than a year, but I haven't seen ... more than two-three plugins in total?
- raindown 3y agoThe system was unstable - it's gotten a major overhaul, already seen a few people writing plug-ins using the new system.
- syrusakbary 3y agoIt's great to see more use cases of Wasmer [1] out there. I'm excited for what's coming next on this front :) [1] https://wasmer.io/ https://wasmer.io/
- laerus 3y agowhat's coming next is replacing wasmer with wasmtime [1], the runtime closely following wasm and implemented by the same people designing the standard itself. [1] https://wasmtime.dev/ https://wasmtime.dev/
- syrusakbary 3y agoWhile that's not true, since the Wasm spec is designed mainly by the browsers, I appreciate the hustle-trolling haha 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 https://news.ycombinator.com/item?id=36128284 (on WASIX launch) 2. https://news.ycombinator.com/item?id=33835683 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)
- davidpfarrell 3y agoIs Zellij in the same realm / in competition with Warp terminal? https://www.warp.dev/ https://www.warp.dev/