Module: RbSys::Cargo::Config

Defined in:
lib/rb_sys/cargo/config.rb

Overview

Reads Cargo configuration files to extract build settings.

Class Method Summary collapse

Class Method Details

.build_target(start_dir: Dir.pwd) ⇒ String?

Returns the build target from Cargo configuration files. Searches from start_dir up to root, then checks CARGO_HOME.

Parameters:

  • start_dir (String) (defaults to: Dir.pwd)

    the directory to start searching from

Returns:

  • (String, nil)

    the target triple, or nil if not configured



13
14
15
# File 'lib/rb_sys/cargo/config.rb', line 13

def build_target(start_dir: Dir.pwd)
  find_in_hierarchy(start_dir) || find_in_home
end