-
Notifications
You must be signed in to change notification settings - Fork 353
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
Cannot list environment variables #756
Comments
This actually fails on Linux as well.
|
I remember not implementing these. We essentially need to manually create an allocation for our env vars instead of having the current datastructure. This means we have to start emulating all of these platforms' env datastructure |
Based on the work already done in #894 I could implement this for linux at least and also make it work with communication enabled. |
This is much harder though if I recall. With this, the interpreted code iterates over some data structure we provide to it, so we have to provide them in the right (platform-specific) format. I haven't looked into what this takes, but it will very likely be different for macOS, Windows and Linux. If you want to give it a shot, feel free to! Having it for Linux only would be better than not having it at all, I guess, though platform differences are also annoying. |
I'm going to start working based on the linux's man entry for Edit: in a fresh new branch with a different PR :D |
Apparently rust just calls |
Please really keep it a separate PR this time though. :) Review complexity scales superlinearly. |
Hahaha yeah, lesson learned :) |
After thinking this during the day I think is better to wait for #894 to land first. The utility function defined in I have a question about how Also, I think we need to change the way environment variables are stored inside Currently we have a However, to reproduce This means that we would need to change Another option would be to allocate the whole environment every time |
another option is to run libc through the c to rust compiler (and hope it works) and then interpret the |
There's no kill like overkill? ;) |
This has been a little problematic. I was not able to create the required static without having stacked borrows issues. |
@christianpoveda do you have your failed attempt still sitting around somewhere? I'm sure it's just a little thing where you have to properly maintain the tags somewhere, or avoid deriving ptrs with different tags, or so. |
Hmmm I checked my branches and it seems it is gone :( I can try it again soon with new eyes :) |
Cargo.toml
src/main.rs
Execution
The text was updated successfully, but these errors were encountered: