in reply to Use a string as a FILE * stream in XS code
(OP here)
I went with the fmemopen/open_memstream route.
They seem to do what I want without too much trouble, and I can live with the fact that they aren't portable - the library itself is pretty much Linux-only at this point.