-
Notifications
You must be signed in to change notification settings - Fork 199
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
realpath in stdlib.h but not in library #81
Comments
Yeah, WASI doesn't have absolute paths, so the standard That said, besides making paths absolute, |
It doesn't have absolute paths at the syscall layer, but doesn't it kind of emulate them in libpreopen? I mean if the concept of PWD exists then can't realpath just use getcwd() to construct an abspath? |
We don't currently have Should we add a |
I think we should encourage the programs that require these sort of absolute path functions to implement them totally in userland, if possible. I wouldn't want to expose the host's "real" cwd at all, but it should be possible to define these functions such that it always pretends to be under |
No, I'm not talking about exposing the real host cwd. But we can build cwd in userspace based on the pre-opened root fd can't we? I'm surprised libpreopen doesn't do this already. Wouldn'tit be as simple as doing: base + global_cwd + relative? I don't understand what you mean about sending the string to the outside world. Paths only make sense within a given module, right? Or at least within modules that shared the same virtualized view of the filesystem. |
Right, I'd imagine it would be similar to running in a chroot. |
The original issue here is fixed in a413650; we no longer declare If anyone's interested in introducing a concept of a cwd, even without exposing the host cwd, we'd need new WASI support, so we should discuss this in the WASI issue tracker. |
I assume we won't have
realpath
for WASI MVP, is that correct? It seems to included instdlib.h
.The text was updated successfully, but these errors were encountered: