Skip to content

Can gitoxide clone a repository in-memory? #829

Answered by Byron
XAMPPRocky asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, it's super interesting to hear that tmpfs has quirks, I always thought that's obviously the way to do this and assumed perfection. I mean, it's RAM backed after all, but truly nothing is perfect apparently.

Right now, the answer to the question has to be "no", as it at some point wants to memory-map the fetched pack file. That requires it to be on disk. However, it should be straightforward to automate the deletion of intermediate files from Rust, but I suppose that's something you can already do.

Once gix-pack actually works in WASM + WASI, I think it would be possible to forego memory mapping and use in-memory packs instead. You could experiment and see if it can be hacked…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants