Can wasmFS exist as a general read-only, desktop, linkable virtual FS? #20764
vadimkantorov
started this conversation in
General
Replies: 1 comment 6 replies
-
By "regular desktop libc context" do you mean outside of wasm and emscripten? Just built normally? If so then with some adaptation it could, perhaps. It does implement in-memory files. But it currently implements syscalls from the custom musl libc used in Emscripten, which would not work out of the box with another libc. You'd need to add support for syscalls for whatever other libc you want (and some other minor things like removing usage of |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
E.g. I need a read-only, virtual FS to read from ISO or a ZIP or an area in the executable's binary file (e.g. packaged via
ld
or#embed
). I wonder, @sbc100 can wasmFS be used as such an impl in a regular desktop libc context (e.g. with muslc)?Basically, it would need to redirect to memopen/fmemopen all file ops that start from some specially-prefixed path and either override open/fopen functions and have a script to patch/ar custom static muslc into such redirects.
This seems similar to some functionality of wasmFS, so curious if it can be used for such a purpose?
Beta Was this translation helpful? Give feedback.
All reactions