Skip to content

WAMR enable file system access #1473

Answered by loganek
m1cha1s asked this question in Q&A
Discussion options

You must be logged in to vote

@m1cha1s unfortunately your test.cpp only contains Hello world text.
Answering your question: your WASM code runs in sandboxing environment, therefore any I/O access must be explicitly granted. To enable access to specific directories, you can use the wasm_runtime_set_wasi_args (second argument in that function is a list of directories that should be allowed, and the third one is the size of the list).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@m1cha1s
Comment options

Answer selected by m1cha1s
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants