Hacker News new | ask | show | jobs
by pitdicker 939 days ago
Unless the environment is also touched by a part of the program written in Go, Julia, I don't know... The lock is not shared across languages.
2 comments

> The lock is not shared across languages.

Which just to be clear: it cannot without changing the standard. There is really nothing anyone can do without a change in the standard.

However, to access any of those languages from rust you need to use unsafe.
There is no safe way to access the environment, even if you mark this API unsafe, what are you going to do?
You can safely access the environment so long as you use the rust apis and don't have unsafe code that calls `setenv` without synchronization.