Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub macro eprint!
Prints to the standard error.
macro std Stable since 1.19.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn vars_os() -> VarsOs
Returns an iterator of (variable, value) pairs of OS strings, for all the environment variables of the current process.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn vars() -> Vars
Returns an iterator of (variable, value) pairs of strings, for all the environment variables of the current process.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn var_os<K>(key: K) -> Option<crate::ffi::OsString>
Fetches the environment variable key from the current process, returning None if the variable isn't set or if there is another error.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn var<K>(key: K) -> Result<String, VarError>
Fetches the environment variable key from the current process.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn temp_dir() -> crate::path::PathBuf
Returns the path of a temporary directory.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn split_paths<T>(unparsed: &T) -> SplitPaths<'_>
Parses input according to platform conventions for the PATH environment variable.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn set_var<K, V>(key: K, value: V)
Sets the environment variable key to the value value for the currently running process.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_current_dir<P>(path: P) -> io::Result<()>
Changes the current working directory to the specified path.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn remove_var<K>(key: K)
Removes an environment variable from the environment of the currently running process.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn join_paths<I, T>(paths: I) -> Result<crate::ffi::OsString, JoinPathsError>
Joins a collection of Paths appropriately for the PATH environment variable.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn home_dir() -> Option<crate::path::PathBuf>
Returns the path of the current user's home directory if known.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn current_exe() -> io::Result<crate::path::PathBuf>
Returns the full filesystem path of the current running executable.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn current_dir() -> io::Result<crate::path::PathBuf>
Returns the current working directory as a PathBuf.
function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const OS: &str
A string describing the specific operating system in use. An example value may be: "linux", or "freebsd".
constant std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const FAMILY: &str
A string describing the family of the operating system. An example value may be: "unix", or "windows".
constant std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const EXE_SUFFIX: &str
Specifies the filename suffix, if any, used for executable binaries on this platform. An example value may be: ".exe", or ".efi".
constant std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const EXE_EXTENSION: &str
Specifies the file extension, if any, used for executable binaries on this platform. An example value may be: "exe", or an empty string ("").
constant std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const DLL_SUFFIX: &str
Specifies the filename suffix, if any, used for shared libraries on this platform. An example value may be: ".so", ".elf", or ".dll".
constant std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const DLL_PREFIX: &str
Specifies the filename prefix, if any, used for shared libraries on this platform. This is either "lib" or an empty string. ("").
constant std Stable since 1.0.0 Version 1.100.0-nightly
"Sometimes, the best projects are the ones you never thought you could build."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.