tectonic icon indicating copy to clipboard operation
tectonic copied to clipboard

Add the possibility to serve assets via map<String, vec<u8>>

Open gerdelma opened this issue 1 year ago • 1 comments

Currently it seems like it is only possible to serve asset files via file system or via HTTP.

While this is totally fine for a cli application, I have been wondering, if this would not be a nice addon for the rust crate. Since temporary file handling within a single application feels a bit clunky to me.

Would it be possible to add an option to serve assets in memory for example via map<String, vec>?

Many thanks in advance.

gerdelma avatar Jul 26 '24 14:07 gerdelma

It sounds like you're looking for MemoryIo - you should be able to run Tectonic entirely in-memory by using MemoryIo as your primary IoProvider in your DriverHooks. If this doesn't work then there's a bug somewhere, as any filesystem and stdin/stdout I/O should go through the registerd IoProviders.

If that's not what you're looking for, I'll need a bit more detail on what you mean by 'serving assets in-memory'.

CraftSpider avatar Feb 12 '25 21:02 CraftSpider