1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-26 16:34:23 +03:00
Commit Graph

73 Commits

Author SHA1 Message Date
Wez Furlong
e090eb9eae
Image decoding is now done in a bg thread
Continuing from the previous commit, this shifts:

* In-memory data -> temporary file
* Image decoding -> background thread

The background thread asynchronously decodes frames and
sends them to the render thread via a bounded channel.

While decoding frames, it writes them, uncompressed, to
a scratch file so that when the animation loops, it is
a very cheap operation to rewind and pull that data
from the file, without having to burn CPU to re-decode
the data from the start.

Memory usage is bounded to 4 uncompressed frames while
decoding, then 3 uncompressed frames (triple buffered)
while looping over the rest.

However, disk usage is N uncompressed frames.

refs: https://github.com/wez/wezterm/issues/3263
2023-03-17 11:41:20 -07:00
Wez Furlong
2d05f8f1f2
ssh: support %l and %L in config files
We also log a warning when an unsupported token is used.

refs: https://github.com/wez/wezterm/issues/3176
2023-03-01 18:44:11 -07:00
Wez Furlong
0ac1cbc47c
deps: socket2 -> 0.5 2023-02-26 22:33:28 -07:00
Wez Furlong
3509e210ce
termwiz: bump version ready for publish 2023-02-12 06:57:31 -07:00
Wez Furlong
0006014f02
ssh: detect exit-signal state for channels
Need to use a newer version of libssh-rs that can report this state,
as the underlying libssh doesn't fold it into the process exit
status.

refs: https://github.com/wez/wezterm/issues/3095
2023-02-11 10:03:44 -07:00
Wez Furlong
d34297cd2c
update base64, work around another batch of breaking API changes
closes: https://github.com/wez/wezterm/pull/2931
2023-01-08 18:49:45 -07:00
Wez Furlong
91ea1095c9
deps: update base64
closes: https://github.com/wez/wezterm/pull/2855
2022-12-12 09:15:09 -07:00
dependabot[bot]
c6e29b78b7 build(deps): bump rstest from 0.15.0 to 0.16.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-27 21:52:32 -08:00
Wez Furlong
9923ae20b5
env_logger -> 0.10
closes: https://github.com/wez/wezterm/pull/2803
2022-11-27 21:37:25 -07:00
Wez Furlong
a6fc9323e2 termwiz: release 0.19 2022-11-02 08:16:09 -07:00
Wez Furlong
a050849695 deps: update to clap 4
Deal with some breaking changes
2022-10-04 08:55:31 -07:00
Wez Furlong
c91d6c396c termwiz: prepare for a 0.18.0 release 2022-09-21 19:20:26 -07:00
Wez Furlong
e6421d1b72 pty: try_clone_writer -> take_writer
This breaking API change allows us to explicitly generate EOF when the
taken writer is dropped.

The examples have been updated to show how to manage read, write
and waiting without deadlock for both linux and windows.
Need to confirm that this is still good on macOS, but my
confidence is high.

I've also removed ssh2 support from this crate as part of this
change. We haven't used it directly in wezterm in a long while
and removing it from here means that there is slightly less code
to keep compiling over and over.

refs: https://github.com/wez/wezterm/discussions/2392
refs: https://github.com/wez/wezterm/issues/1396
2022-08-12 07:56:46 -07:00
Wez Furlong
edeae72b5f termwiz: bump version to 0.17 2022-08-01 18:31:43 -07:00
dependabot[bot]
e2eb2b444b build(deps): bump rstest from 0.14.0 to 0.15.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.14.0...0.15.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 06:24:17 -07:00
dependabot[bot]
43a541a485 build(deps): bump rstest from 0.13.0 to 0.14.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.13.0...0.14.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 05:23:14 -07:00
Wez Furlong
f857ec6a5a deps: structopt -> clap 3 2022-05-28 07:07:52 -07:00
Wez Furlong
0e0bac2576 deps: prune some unused deps 2022-05-19 06:48:09 -07:00
Wez Furlong
3800710ead cargo update 2022-05-15 19:44:27 -07:00
Gregory Anders
c636a4d7a0 ssh: support BindAddress for libssh2 2022-04-15 20:53:07 -07:00
Wez Furlong
b35e3b2aad deps: remove pretty_env_loggger
Go directly to the underlying env_logger crate, as pretty_env_logger
hasn't been updated in some time, and I'd like to be able to redirect
the log output to a file more directly, and that feature is in a newer
version of the env logger than pretty_env_logger was pulling in.
2022-04-07 08:24:07 -07:00
Wez Furlong
d0d23d6c46 termwiz: prep for crates.io 2022-04-07 07:27:54 -07:00
Wez Furlong
c4009d8e1d deps: shell-words -> 1.1.0 2022-02-06 18:32:10 -07:00
Wez Furlong
705d518242 ssh: restore async_oss dep 2022-01-30 18:45:12 -07:00
Wez Furlong
c4c0b5a569 ssh: prep for crate release 2022-01-30 18:43:55 -07:00
Chip Senkbeil
5042addb06 Add features to enable vendored-openssl for ssh2 and libssh-rs individually 2022-01-09 19:36:56 -08:00
Chip Senkbeil
1f17416e60 Support gating libssh-rs and ssh2 behind features of same name 2022-01-09 19:36:56 -08:00
Wez Furlong
b40f65c25e termwiz: s/Fuschia/Fuchsia/g
closes: #1407
2021-12-21 20:38:59 -07:00
Wez Furlong
de13e17723 ssh: explicitly allow ssh-rsa keys in tests
It looks like the debian 9 test failures with libssh are the
same underlying issue as https://github.com/wez/wezterm/issues/1262

Poking around in the debug output, and then spelunking through the code,
we can use the `pubkeyacceptedtypes` ssh config option to add the key
type to the list of keys.  This doesn't appear to be a documented
option in the current versions of openssh.

I'm not 100% sure that this is right, but it's worth a shot.
2021-12-15 22:05:24 -07:00
Wez Furlong
36a16cb70d fix windows build
A recent cargo update caused openssl-sys to do a minor semver update
from 0.9.71 -> 0.9.72, but that release downgraded from openssl 3
to openssl 1 to resolve a performance regression:
<https://github.com/sfackler/rust-openssl/pull/1578>

That in turn caused libssh to fail to build because the ENGINE
feature required by libssh isn't compiled in in openssl-src 1
crate when vendoring on windows.

For now, my libssh git repo is constrained to openssl-sys 0.9.71,
and we're pointing to that from the wezterm repo.
2021-12-13 09:02:24 -07:00
Wez Furlong
137bdacd3f cargo update
and bump rstest to make dependabot happier
2021-12-12 20:21:55 -07:00
Wez Furlong
7926c31209 pty: introduce ChildKiller trait
In the mux layer, we have some code that takes a `Child` and then
does a bit of naughty reaching through the abstraction to get at
the pid/handle of the child so that we can send it signals even
if the child is itself mutably (and thus exclusively) borrowed
for the purposes of waiting.

That worked fine for local processes spawned in the mux, but we also
use LocalPane to wrap around arbitrary `Child`ren, such as Ssh,
that are not local and that don't have a local process id, which
meant that this hack wouldn't work for them.

To make things a bit worse, those ssh ptys were used to ssh2 days
where we didn't have a way to signal the remote process and just
did nothing, leading to confusing situations such as
https://github.com/wez/wezterm/issues/1197

This commit graduates the hack mentioned in the first paragraph
to its own ChildKiller trait.  This makes the concept of waiting
for the Child distinct from signalling it and explicitly allows
getting a separate object that can be used for signalling.

With that in place, we're forced to implement something appropriate
for the ssh pty implementations; one in the pty crate itself,
one in wezterm-ssh and the wrapper that we use in the mux crate.

The upshot of this is that the `CloseCurrentPane` action now operates
correctly on panes that were the result of split operations.
2021-12-11 08:40:26 -07:00
Wez Furlong
ebc6e6f8b9 Pick up updated ssh crate + windows fixes 2021-12-10 15:25:48 -07:00
Wez Furlong
225e7a1243 introduce unicode_version config
This is a fairly far-reaching commit. The idea is:

* Introduce a unicode_version config that specifies the default level
  of unicode conformance for each newly created Terminal (each Pane)
* The unicode_version is passed down to the `grapheme_column_width`
  function which interprets the width based on the version
* `Cell` records the width so that later calculations don't need to
  know the unicode version

In a subsequent diff, I will introduce an escape sequence that allows
setting/pushing/popping the unicode version so that it can be overridden
via eg: a shell alias prior to launching an application that uses a
different version of unicode from the default.

This approach allows output from multiple applications with differing
understanding of unicode to coexist on the same screen a little more
sanely.

Note that the default `unicode_version` is set to 9, which means that
emoji presentation selectors are now by-default ignored.  This was
selected to better match the level of support in widely deployed
applications.

I expect to raise that default version in the future.

Also worth noting: there are a number of callers of
`unicode_column_width` in things like overlays and lua helper functions
that pass `None` for the unicode version: these will assume the latest
known-to-wezterm/termwiz version of unicode to be desired. If those
overlays do things with emoji presentation selectors, then there may be
some alignment artifacts. That can be tackled in a follow up commit.

refs: #1231
refs: #997
2021-11-25 09:00:45 -07:00
Wez Furlong
d1e0562631 restore async_ossl dep after wezterm-ssh crates.io release 2021-11-23 05:36:52 -07:00
Wez Furlong
3f63f4a2e2 prep for wezterm-ssh release 2021-11-23 05:35:51 -07:00
Wez Furlong
30cb55a7bd pty: bump version
The changes in #1275 introduce an API change, so let's not forget to
bump this.
2021-11-23 05:22:32 -07:00
Wez Furlong
154691a196 ssh: point to released libssh-rs crate 2021-11-03 09:17:32 -07:00
Wez Furlong
e736d02d9e remove patched openssl-sys crate
The appropriate openssl-src is now used upstream
2021-11-03 06:38:20 -07:00
Wez Furlong
6f0757b73c ssh: update for to pick up https://github.com/wez/libssh-rs/pull/1 2021-10-20 21:46:37 -07:00
Wez Furlong
b32e077231 ssh: another bump for debian9 and centos7 2021-10-20 08:28:22 -07:00
Wez Furlong
a55ba2be35 ssh: maybe fix build 2021-10-20 07:53:55 -07:00
Wez Furlong
7f138409a3 ssh: point to rev with older openssl build tweaks 2021-10-20 07:16:19 -07:00
Wez Furlong
58ad4a2c4b ssh: update to fixed win32 build
refs: #1014
2021-10-19 21:04:56 -07:00
Wez Furlong
d43f1e9e26 ssh: fixup vendored-openssl selection for libssh-rs 2021-10-19 20:33:30 -07:00
Wez Furlong
8be442e39b ssh: can now pass e2e tests using libssh backend 2021-10-19 20:33:30 -07:00
Wez Furlong
9d44cc1720 ssh: introduce SftpWrap 2021-10-19 20:33:30 -07:00
Wez Furlong
a8b64a2756 Run with libssh
This works, but on macOS, there is a segfault in openssl when the
session is closed... I'm going to try this on Linux to see if it
is consistent behavior and ponder next steps.
2021-10-19 20:33:30 -07:00
Wez Furlong
f1e5c59566 ssh: introduce wrapper enum
This is a pre-cursor step to adding libssh support
2021-10-19 20:33:30 -07:00
Wez Furlong
d635512138 wezterm-ssh: restore dep after cargo publish 2021-10-10 16:38:03 -07:00