You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add command-line options to configure environment sandbox
The environment sandbox controls access to environment variables and
which path prefixes are available for opening from source (ie, with
the env!() and include!() class of macros).
By default, it does nothing. However, if you configure some sandbox options
then they will override the default-open mode of operation.
The options are:
--env-clear - clear entire environment, making all env!() operations fail
--env-allow VAR - allow a specific environment variable to be used
--env-define VAR=VAL - define the value of an environment variable for env!()
--clear-include-prefixes - clear all valid prefixes, making all include!() operations fail
--include-prefix PATH - define a path prefix that all include files must start with
These options are cumulative.
The environment sandboxing is different from controlling the environment that's
present when rustc is invoked, say with the "env" command. Sandboxing allows the
environment used by rustc - such as PATH or LD_LIBRARY_PATH (or equiv) -
versus the environment that's available to the compiled Rust source itself.
(This change just collects the options and sets up the EnvSandbox, but does not
implement any constraints.)
0 commit comments