Add ability to initialize cwd from PWD when targeting WASI#5040
Add ability to initialize cwd from PWD when targeting WASI#5040youknowone merged 2 commits intoRustPython:mainfrom
Conversation
|
cc @lastmjs |
|
Thank you for contributing! |
|
The way it's implemented is not a de facto solution and WASI doesn't have a notion of a cwd and any paths are always resolved via pre-opened directories. However, IMO it's reasonable to allow to set the cwd to something other than |
aeb92fd to
3131d56
Compare
youknowone
left a comment
There was a problem hiding this comment.
Thank you so much! Please let us know if you find anything lack of WASI support.
|
Will do! Thanks a ton for getting this in, and also for all your work on this! This is really huge 🙏 |
When compiling to WASI the the current directory is set to
/on boot. That's a bit unfortunate and it means that if you'd list files in.it would read the root directory. This PR allows to initialize the current working directory from thePWDenvironment variable. I have added atargetcheck to only do this for WASI.