A terminal workspace with batteries included
Go to file
har7an 11b0210de5
plugins: rework plugin loading (#1924)
* zellij: Move "populate_data_dir" to utils

and rewrite it to take a second, optional parameter. This allows
controlling whether only a specific asset should be installed. We do
this as preparation for being able to recover from a plugin version
mismatch error, where we will need to repopulate the data dir for
offending plugins.

* server/wasm_vm: Recover from PluginVersionMismatch

Adds a global plugin cache that stores, per plugin config, the wasmer
module associated with it. Make `start_plugin` take the pre-populated
module and create only the necessary modifications to the wasm env etc.

* utils: Fix formatting

* zellij: Delete non-existent module

* utils/shared: fix missing "set_permissions"

function when not on unix systems.

* server/wasm_vm: Don't populate cachedir

with serialized versions of the WASM plugins.

* utils/input/plugins: load wasm bytes from assets

for builtin plugin specifications. This foregoes any need to:

- Dump the plugin bytes to disk at all and
- subsequently read the plugin bytes from disk

* zellij: Disable default asset installation

which previously installed only the builtin plugins to disk. This is no
longer necessary because now we can load the builtin plugins directly
from the application binary.

* utils/input/plugins: Update docs

* utils/input/plugins: Add 'is_builtin' method

to `PluginConfig` that returns true if the plugin configuration refers
to a builtin plugin.

* wasm_vm: Remove plugin version mismatch handling

because a version mismatch in an internal plugin is now unfixable, with
the plugins being loaded from the running binary, and we have no control
over external plugins in the first place.

* cargo: Reintroduce feature flag

for `disable_automatic_asset_installation`

* utils/consts: Add `ASSET_MAP`

which currently contains the compiled WASM plugins.

* utils/shared: Fix clippy lint

* utils/errors: Add more `ZellijError` variants

* zellij: Make loading internal plugins optional

by reenabling the `disable_automatic_asset_installation` flag and
utilizing it for this purpose. Changes plugin search behavior to throw
better errors in case the builtin plugins cannot be found, depending on
the state of this feature.

* utils/errors: Apply rustfmt

* utils/setup: Allow dumping builtin plugins

to a specified folder on disk. This is meant to be an "escape hatch" for
users that have accidentally deleted the builtin plugins from disk (in
cases where the plugins aren't loaded from inside the zellij binary).

* utils/input/plugins: Update docs

* utils/setup: Add hint to `setup --check` output

when zellij was built without the `disable_automatic_asset_installation`
flag and will thus not read builtin plugins from the "PLUGIN DIR".

* utils/setup: Refine `setup --dump-plugins`

to dump to:

- The default "DATA DIR" when no option is provided with the argument,
  or
- The provided option, if existent

Also print a message to stdout with the destination folder that the
plugins are dumped to.

* server/wasm_vm: Ignore "NotFound" errors

when attempting to delete the non-existent plugin data directories. This
silences an error message that otherwise ends up in the logs when
quitting zellij.

* utils/errors: Extend "BuiltinPluginMissing" msg

to hint the user to the `zellij setup --dump-plugins` command to fix
their issues for them!

* utils/errors: Track caller in calls to `non_fatal`

which will hopefully, once closures can be annotated, allow us to
display the location of the call to `non_fatal` in log messages.

* utils/input/plugins: Fix plugin lookup

to prefer internal assets if available. It was previously broken because
sorting the paths vector before deduping it would bring the paths into a
wrong order, looking up in the plugin folder first.

Also print a log message when a plugin is being loaded from the internal
assets but exists on disk, too.

* Apply rustfmt

* make: build-e2e depends on wasm-opt-plugins

so it updates the assets when building the binary

* server/qwasm_vm: Remove var

* utils/consts: Add plugins from target folder

and include them in the asset map from there, too. Include plugins from
debug or release builds, depending on the build type.

* utils/consts: Take release plugins from assets

instead of the target/release folder. The latter will break
installations from crates.io, because we currently rely on including the
plugins we pre-compiled and distribute along with the binary.

* server/wasm_vm: Reintroduce .cache folder

to speedup subsequent application launches.

* cargo: Reorder workspace members

to improve behavior with `cargo make` with respect to compilation order.

* Makefile: restructure plugin tasks

* Makefile: Fix CI errors

* Makefile: More CI diagnosis

* github: Install wasm-opt in e2e test workflow

* Makefile: Build plugins for e2e-test target

* server/Wasm_vm: Reorder plugin folder creation

so no folders are created in the plugin cache when loading a plugin
fails due to not being present or similar.

* update plugins testcommit

* makefile: Change job order

* changelog: Add PR #1924
2022-11-22 20:06:02 +00:00
.cargo feat: add capability to dispatch actions from cli (#1265) 2022-06-15 11:20:06 +02:00
.github plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
.nix fix(nix) missing frameworks on darwin (#1724) 2022-10-04 12:23:04 +02:00
assets plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
default-plugins performance(rendering): improve rendering performance (#1960) 2022-11-21 20:07:24 +01:00
docs docs: Improve error handling docs (#1919) 2022-11-09 18:01:36 +00:00
example fix(themes/catppuccin): black and white inverted (#1953) 2022-11-17 23:16:09 +09:00
src plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
zellij-client Support clipboard to text input (#1926) 2022-11-12 11:47:02 +09:00
zellij-server plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
zellij-tile performance(rendering): improve rendering performance (#1960) 2022-11-21 20:07:24 +01:00
zellij-tile-utils chore(version): bump development version 2022-11-10 11:48:09 +01:00
zellij-utils plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
.editorconfig add: editorconfig (#1156) 2022-03-02 12:12:26 +01:00
.envrc fix: .envrc 2022-03-11 18:37:43 +01:00
.git-blame-ignore-revs chore(gblame): add move to git-blame-ignore-revs 2022-07-10 15:33:19 +02:00
.gitignore add: result-* to gitignore (#1144) 2022-02-28 08:17:54 +01:00
.rustfmt.toml add(style): add trailing comma in match blocks (#1483) 2022-06-10 20:03:13 +02:00
Cargo.lock refactor(plugins): change the data flow (#1934) 2022-11-15 12:21:36 +01:00
Cargo.toml plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
CHANGELOG.md plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
CODE_OF_CONDUCT.md docs(coc): initial 2020-10-27 11:11:10 +01:00
CONTRIBUTING.md update log path (#1927) 2022-11-13 23:25:37 +09:00
docker-compose.yml fix(docker-compose): Use the key-value style for environments to prevent human errors (#840) 2021-11-09 20:29:22 +01:00
flake.lock flake.lock: Update (#1889) 2022-11-01 09:34:45 +01:00
flake.nix move: default.nix and shell.nix files from root (#1618) 2022-07-29 22:31:29 +02:00
GOVERNANCE.md Add har7an to governance.md 2022-07-29 08:44:19 +00:00
LICENSE.md Update references of mosaic to Zellij in md files 2021-02-10 12:12:19 +05:30
Makefile.toml plugins: rework plugin loading (#1924) 2022-11-22 20:06:02 +00:00
README.md made the README more aesthetic (#1885) 2022-11-08 16:48:12 +01:00
rust-toolchain.toml rust-toolchain: Update (#1834) 2022-10-22 12:12:42 +02:00
treefmt.toml add(nix): treefmt / alejandra (#1201) 2022-03-10 16:27:39 +01:00


logo
Zellij

Discord Chat Matrix Chat Zellij documentation Built with nix

demo

[Installation] [Overview] [Configuration] [Templates] [FAQ]

What is this?

Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. At its core, it is a terminal multiplexer (similar to tmux and GNU Screen), but this is merely its infrastructure layer.

Zellij includes a layout system, and a plugin system allowing one to create plugins in any language that compiles to WebAssembly.

You can get started by installing Zellij and reading the overview.

For more details about our future plans, read about upcoming features in our roadmap.

Zellij was initially called Mosaic.

How do I install it?

You can install with cargo:

cargo install --locked zellij

Or if want to a prebuilt binary, you can download it from our releases, or use cargo-binstall.

cargo-binstall zellij

Or you can also use Third Party Repositories.

Try Zellij without installing

bash/zsh:

bash <(curl -L zellij.dev/launch)

fish:

bash (curl -L zellij.dev/launch | psub)

How do I get involved?

Zellij is a labour of love built by an enthusiastic team of volunteers. We eagerly welcome anyone who would like to join us, regardless of experience level, so long as they adhere to our Code of Conduct.

Please report any code of conduct violations to aram@poor.dev

To get started, you can:

  1. Take a look at the Issues in this repository - especially those marked "good first issue". Those with the "help wanted" tag probably don't have anyone else working on them.
  2. Drop by our Discord, or Matrix chat and ask what you can work on, or how to get started.
  3. Open an issue with your idea(s) for the project or tell us about them in our chat.

How do I start a development environment?

  • Clone the project
  • Install cargo-make with cargo install --locked --force cargo-make
  • In the project folder, for debug builds run: cargo make run
  • To run all tests: cargo make test

For more build commands, see CONTRIBUTING.md.

Configuration

For configuring Zellij, please see the Configuration Documentation.

What is the current status of the project?

Zellij should be ready for everyday use, but it's still classified as a beta. This means that there might be a rare crash or wrong behaviour here and there, but that once found it should be fixed rather quickly. If this happens to you, we would be very happy if you could open an issue and tell us how to reproduce it as best you can.

Roadmap

Presented here is the project roadmap, divided into three main sections.

These are issues that are either being actively worked on or are planned for the near future.

If you'll click on the image, you'll be led to an SVG version of it on the website where you can directly click on every issue

roadmap

License

MIT