14 Commits
Author SHA1 Message Date
TomauskaszandTomauskasz eb8df995d5 win,blob: Fix duplicate blob storage on Windows (#7955)
Reuse live content-addressed blobs instead of replacing them.
This avoids ERROR_ACCESS_DENIED when a reader still has the existing
file open and keeps the reference count balanced.


---------

Co-authored-by: Tomauskasz <tomas.bitvinskas@gmail.com>
2026-11-12 05:43:11 +01:00
Yiding Jia 05343b3870 wezterm-blob-leases: Use uuid v4 over v1 2026-01-17 15:44:28 +00:00
Wez Furlong edcdefda3b workspace-ify the deps
There have been a couple of attempts at this in the past, which
had some usability warts in what I recall as an earlier, less
useful set of features overall.

Whether that was collective misunderstanding at the time, or things
have gotten better since then, now is a good time to adopt the workspace
dep syntax, because wezterm has many crates to keep on top of, and
automation like dependabot can't see a lot of them.

This will help to manage the versions of deps in wezterm centrally.

Let's try this out in CI: the Cargo.lock changes here are minimal
(eliminated a second version of base64 from one crate, terminal_size
from another, and removed an explicit dep on serde_derive) so
hopefully this sails through on !linux.

closes: https://github.com/wezterm/wezterm/pull/6668
2025-02-12 09:43:36 -07:00
Wez Furlong 034e217966 rustfmt 2025-02-10 07:57:05 -07:00
Wez Furlong ee4f6b0d27 blob-leases: update deps
refs: https://github.com/wezterm/wezterm/issues/6649
2025-02-10 07:55:10 -07:00
Wez Furlong 11c4b11669 s,wez/wezterm,wezterm/wezterm,
I moved the repo to an org of its own. Update various things
to reference the new location.
2025-02-07 13:08:01 -07:00
Martin von Zweigbergk 4bf0007cef add a few missing license files
I didn't symlink to the license file in the root because it mentions
license that don't seem to apply to the crates I added license files
to here.

I used the year each directory was created as the first copyright
year.

I didn't add license files to all crates because I don't need them for
what I'm working on right now, and I want to avoid having to figure
out which licenses apply to which crates.

#2347
2025-01-24 15:40:57 -07:00
Wez Furlong f7a0a0f1a6 blob-lease: improve error handling
If someone removed the directory structure, or otherwise messed with
the files, there was a good chance that we'd end up in a panic.

This commit improves the error messaging produced by the blob
lease layer to provide the path as context, log the error,
and then translate the error case to an empty frame so that
the rest of the rendering machinery can proceed in a more reasonable
way.

We take care to log this sort of corrupt frame error only once,
as it is most likely to occur in an animated gif and will thus
trigger multiple times per second for such a file.

refs: #5422
2024-07-14 07:45:10 -07:00
Wez Furlong ff4528e783 fix: blob leases could be broken by tmpwatch
Let's put them in an application-specific cache directory
location instead.

refs: #5422
2024-07-14 07:10:17 -07:00
Wez Furlong b956a6ac30 wezterm-blob-leases: prep for crates.io publish 2024-01-27 12:11:08 -07:00
Wez Furlong 4ae176dd8a try scaling down images that don't fit in the texture atlas
When trying to display a 4k image there is a high chance that
we'll run out of texture space and then render with no images
displayed.

This commit changes the binary yes/no allow-images into a a series
of attempts: display at natural size, scale down by 2, 4, then 8,
then give up on images.

While looking at this, I noticed that we had a TOCTOU in the blob lease
stuff in the case where we might very quickly try the handle the same
image in succession, and end up deleting a file out from under a live
lease.

I've put in place a simple bandaid for that, but it's probably worth
revisiting the concurrency model for that.
2023-05-19 08:57:38 -07:00
Wez Furlong 5b51179265 deps: update sha2
closes: https://github.com/wez/wezterm/pull/3379
2023-03-26 19:50:53 -07:00
Wez Furlong 4466997b88 clean up blob storage on shutdown
The static OnceCell didn't run destructors, so shift to something
where we can explicitly trigger them to run and clean up the
temporary directory area.
2023-03-18 22:19:46 -07:00
Wez Furlong 6c86bfba39 add wezterm-blob-leases crate 2023-03-18 20:30:47 -07:00