-
Is the memory backend just MEMFS? If so do I need to do |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The memory backend is very similar to MEMFS, but it store file contents in Wasm memory rather than in JS. That makes it more efficient in multithreaded applications because each thread can access the memory independently of the others. You can depend on the fact that it is mounted to "/" by default, so no need to create and mount it yourself. |
Beta Was this translation helpful? Give feedback.
-
I still don't understand, how does it know when to use wasm memory or js memory, I thought this has to be mounted in order for it to know I am using wasm memory, otherwise wouldn't this just use JS from the FS object because I was using "/" without mounting? At the end, should I mount? Or just use it, what is more efficient? @tlively |
Beta Was this translation helpful? Give feedback.
The memory backend is very similar to MEMFS, but it store file contents in Wasm memory rather than in JS. That makes it more efficient in multithreaded applications because each thread can access the memory independently of the others.
You can depend on the fact that it is mounted to "/" by default, so no need to create and mount it yourself.