-
Notifications
You must be signed in to change notification settings - Fork 21
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
Home directory #59
Comments
The idea that all Rust code runs within an environment that has a concept of a "user account" that exists on a "system" which has a "home directory" with certain expected contents and expectations, is not one that cleanly maps to WASI's approach to sandboxing and virtualization. Typically, when people ask how to get the home directory on WASI, we ask what they're going to use it for, and then with that extra context, we're often able to give them more specific advice on what to do. The |
What are possible solutions? Maybe we can find a common thing in them. I think when programs need home, they need an isolated place to persist some files and configs, without conflicts with other users running the same program. In WASI file system is usually isolated more than scope of a user, and I think any path is a valid path in this case. By using |
My suggestion would be to have Are two different WASI programs running as the same user or different users? They are sandboxed from each other within WASI, but should they share a "home" directory? There may be situations where one wants that, and situations where one doesn't. Until we have a more complete answer, I think it's best to be conservative here. |
The original question here seems answered; please reopen if there are any further questions! |
I still don't see how this has conflict with returning $HOME? By returning the |
In the context of WASI, I think it makes perfect sense to use But, if you use it this way, I think the home-finder function should make sure To control the home directory as @HKalbasi describes, runtimes could just mount |
For porting applications that rely on home directory concept, is a standard choice or function to use? If not, is it fine to use
$HOME
environment variable which unix usually sets? Asking for adding WASI version ofhome_dir
function inhome
rust crate.The text was updated successfully, but these errors were encountered: