How can I enable networking while sharing a directory?
The container2wasm project is truly outstanding. Recently, I encountered a challenging issue while using it. When I run it via c2w-net (which essentially executes wasmtime), I observed that if I do not use preview2=n and remove tcplisten, the --dir flag works correctly for directory sharing. However, if I enable networking (by setting preview2=n and configuring tcplisten), networking functions normally, but directory sharing fails.
I have spent several days investigating this issue without resolution. Any guidance would be greatly appreciated!
Expected behavior: Networking and directory sharing should work simultaneously.
Thank you very much!
This looks like a known issue in wasmtime, please see https://github.com/bytecodealliance/wasmtime/issues/3936 . This issue seems a duplicate of https://github.com/container2wasm/container2wasm/issues/291 .
@ktock Thank you for your response. I noticed that directory sharing works normally when not using preview1 , so is it possible to enable networking without relying on preview1 ? I also observed that preview2 has a TCP-related option "-S tcp=y" could this feature be leveraged to achieve simultaneous networking and directory sharing?
Once again, thank you for your guidance and exceptional work!