Please add an API for readonly files
Currently gguf-tools (as used in e.g. MLX - a popular choice on Apple platforms) cannot open *.gguf files on iOS, if those gguf files are in the app bundle. The root cause is it always seems to open files in read/write mode, and then it also mmaps writable regions, both of which fail on iOS because bundled data is very much read-only by design. I imagine there could be other circumstances where read-only access is desirable.
It'd be great if there was a readonly mode for read-only access.
Here's what I mean. This, obviously, is not a complete fix because it permanently switches things into read-only mode, which is not suitable for all circumstances. That is how we patched it for our own specific needs.
Encountered the same issue with gguf_open when downloading models as one user, and then using it with container as different one. It would make sense to at least be able to choose mode of opening.