Virtual file system

Right now, zola serve will write to disk which is pretty wasteful.
It would be nice if all the files were stored in memory and served from there, without any IO.

Does anyone know an easy way to do that in Rust?

I’d recommend tempfile.

I was thinking more of a huge hashmap that the webserver uses to serve everything other than static files. And the serve command would just replace the hashmap with a full build. If a path is not found in the hashmap, try to serve it from disk (ie static assets).