mcm
mcm copied to clipboard
luacat: file references
I want some mechanism to be able to pass files around into mcm.resource. The idea is that if you just want to include a binary file, it can be much more efficient to have the C++ side of it read it (or mmap it) into a Cap'n Proto segment.
However, luacat programs should be able to read the data into memory if need be (to allow templating etc.). So perhaps a fileref:read() call, along with some flag in luacat to provide a limit on how large of a file that can be read in in this manner.