feat(isolation/filemap): Use proper tree for all file lookups#1256
feat(isolation/filemap): Use proper tree for all file lookups#1256fogti wants to merge 2 commits intohermit-os:mainfrom
Conversation
3ba863b to
6eaec42
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1256 +/- ##
==========================================
- Coverage 78.24% 76.88% -1.36%
==========================================
Files 26 27 +1
Lines 3824 3876 +52
==========================================
- Hits 2992 2980 -12
- Misses 832 896 +64 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bd0c82b to
8625781
Compare
|
The only thing I still dislike a bit about this is that the interface of |
68cbed2 to
0448912
Compare
|
It doesn't make sense to keep this as draft, the change in |
b1af1a9 to
08693f9
Compare
|
Split off Hermit image handling into #1282. |
This shifts usages of `CStr` and `OsStr` onto API consumers. All places where guest paths are used now use `&str`, and all places where host paths are used now use `&Path` (or the owned variants, respectively).
| OnHost(PathBuf), | ||
|
|
||
| /// An in-memory file | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
I've got no clue why this lint triggers on MacOS, but not on Linux.
This changes the implementation of the file map such that it uses an actual tree for file lookup instead of a hashmap of paths with backtracking. This should improve performance in case of an extremely large file map. The motivation for this is that it makes it way easier to represent virtual files in the file map, and is a prerequisite for Hermit image support.
For demo purposes (and to make it obvious how one would build on top of this later), this also adds support for inserting the content of tar files (i.e. decompressed Hermit images) to the file map tree.
Supersedes #1135.
Depends on #1271.
Blocked on hermit-os/hermit-entry#82.