-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add home_dir
for WASI
#26
base: master
Are you sure you want to change the base?
Conversation
@HKalbasi hi! sorry for the delay but do you have a doc or reference for what wasi sets? |
I think, ..., it doesn't really matter? WASI doesn't have concept of users, and its filesystem is isolated and sandboxed, by using But to make sure, I opened WebAssembly/wasi-filesystem#59 |
@brson Could this PR please get merged? Some applications, like https://github.com/helix-editor/helix, depend on this crate, and compilation of the Assuming the |
@turbolent It is not clear which solution is the correct one for WASI. You might want to say your opinion on WebAssembly/wasi-filesystem#59 |
Well, having a possible implementation which is close to what other platforms do is still better than none. Given there is no "correct" one. Currently, the missing implementation means applications using it do not build at all. |
The suggested implementation in that issue is unconditionally returning |
Btw all maintenance of this project has moved into cargo's repository. |
This PR adds
home_dir
implementation for Web Assembly System Interface (WASI) target, that usesHOME
environment variable. Since WASI lacks concept of user, I think this is the way to go.Lacking this function makes porting binaries to WASI unnecessarily harder.