Struct rb_sys_build::RbConfig

source ·
pub struct RbConfig {
    pub search_paths: Vec<SearchPath>,
    pub libs: Vec<Library>,
    pub link_args: Vec<String>,
    pub cflags: Vec<String>,
    pub blocklist_lib: Vec<String>,
    /* private fields */
}
Expand description

Extracts structured information from raw compiler/linker flags to make compiling Ruby gems easier.

Fields

search_paths: Vec<SearchPath>libs: Vec<Library>link_args: Vec<String>cflags: Vec<String>blocklist_lib: Vec<String>

Implementations

Creates a new, blank RbConfig. You likely want to use RbConfig::current() instead.

All keys in the RbConfig’s value map.

Instantiates a new RbConfig for the current Ruby.

Pushes the LIBRUBYARG flags so Ruby will be linked.

Get the name for libruby-static (i.e. ruby.3.1-static).

Get the name for libruby (i.e. ruby.3.1)

Filter the libs, removing the ones that are not needed.

Returns the current ruby version.

Get the CPPFLAGS from the RbConfig, making sure to subsitute variables.

Returns the value of the given key from the either the matching RBCONFIG_{key} environment variable or RbConfig::CONFIG[{key}] hash.

Returns the value of the given key from the either the matching RBCONFIG_{key} environment variable or RbConfig::CONFIG[{key}] hash.

Enables the use of rpath for linking.

Push cflags string

Get major/minor version tuple of Ruby

Get the rb_config output for cargo

Print to rb_config output for cargo

Adds items to the rb_config based on a string from LDFLAGS/DLDFLAGS

Sets a value for a key

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.