Hi! In current zig (as opposed to 0.11), you could actually use an std.io.AnyReader here. The std.io.Reader is actually a std.io.GenericReader, which has a method called any(), which returns an AnyReader. I use this successfully in a project I am currently working on, with both file readers and also a self-built string reader. Works fine.
4 Likes