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

Ability to set environment variables #475

Closed
tiborvass opened this issue May 29, 2019 · 1 comment · Fixed by #476
Closed

Ability to set environment variables #475

tiborvass opened this issue May 29, 2019 · 1 comment · Fixed by #476
Labels
🎉 enhancement New feature!

Comments

@tiborvass
Copy link

I couldn't find a way to set an environment variable neither in the help nor in the Rust code.

Motivation

Because it's an easy way to configure a program's behavior.

Proposed solution

Add a --env key=value cli option.

@MarkMcCaskey
Copy link
Contributor

This would be a nice option to have!

It looks like wasmer currently forwards along all the host's environment variables by default. We'll probably make a breaking change here eventually (so the sooner the better, I guess).

We did have a bug with WASI env var syscalls that should be fixed in #476 ! So hopefully they work now

bors bot added a commit that referenced this issue May 30, 2019
476: fix bug in wasi::environ_get, fix off by one error in env_size_get r=MarkMcCaskey a=MarkMcCaskey

adds `--env` flag (resolves #475)
fixes other wasi env bugs
adds wasi envvar test

Co-authored-by: Mark McCaskey <[email protected]>
@bors bors bot closed this as completed in #476 May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants