Skip to content
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

Zig doesn't work with relative paths #36

Open
syrusakbary opened this issue Apr 9, 2022 · 2 comments
Open

Zig doesn't work with relative paths #36

syrusakbary opened this issue Apr 9, 2022 · 2 comments

Comments

@syrusakbary
Copy link
Member

This doesn't work

$mkdir /play
$ cd /play
$ wapm install topolarity/zig
$ zig build-exe ./example.zig

But this work:

zig build-exe /play/example.zig
@syrusakbary
Copy link
Member Author

Not sure if it's related:

mkdir /play
cd play
ls .. # this doesn't show the root. I guess is intended?

@john-sharratt
Copy link
Collaborator

Yeah we need to talk about this one on zoom. It's because working directories need some special changes due to the limitations of the runtime - in the short term either:

  • zig can use the PWD environment variable for relative path
    (or)
  • we can set the chroot flag but that would need to be added to wapm.toml
    (or)
  • refactor wasmer runtime so that it handles working directories better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants