class RbSys::Mkmf::Config
Config that delegates to CargoBuilder if needded
def cross_compiling?
def cross_compiling? RbConfig::CONFIG["CROSS_COMPILING"] == "yes" end
def initialize(builder)
def initialize(builder) @builder = builder @force_install_rust_toolchain = false @auto_install_rust_toolchain = true @clean_after_install = rubygems_invoked? @rubygems_clean_dirs = ["./cargo-vendor"] end
def method_missing(name, *args, &blk)
def method_missing(name, *args, &blk) @builder.send(name, *args, &blk) end
def respond_to_missing?(name, include_private = false)
def respond_to_missing?(name, include_private = false) @builder.respond_to?(name) || super end
def rubygems_invoked?
We want to know this so we can cleanup the target directory after an
Seems to be the only way to reliably know if we were invoked by Rubygems.
def rubygems_invoked? ENV.key?("SOURCE_DATE_EPOCH") end