wasmer-python icon indicating copy to clipboard operation
wasmer-python copied to clipboard

How to set the pre-open directory when perform wasi program?

Open abc767234318 opened this issue 1 year ago • 0 comments

Summary

I have a wasi program, and the command "wasmer run B1-4.wasm --dir=./testfolder -- testfolder" will make it perform well. But it seems that the wasmer-python can't set the pre-open directory as wasmer-cli does. I found that the wasmer-python not support the following options from the example folder.

wasi_env = \
    wasi.StateBuilder('wasi_test_program'). \
        argument('--test'). \
        environment('COLOR', 'true'). \
        environment('APP_SHOULD_LOG', 'false'). \
        map_directory('the_host_current_dir', '.'). \
        finalize()

abc767234318 avatar Apr 12 '23 02:04 abc767234318