Sha256: 80e802e365c9b1234cea90e331ec0791851089d34e1dd329ace5abe6d140f82d

Contents?: true

Size: 808 Bytes

Versions: 73

Compression:

Stored size: 808 Bytes

Contents

require "mkmf"
require "rb_sys/mkmf"

if find_executable('rustc')
  create_rust_makefile("fast_mmaped_file_rs") do |r|
    r.auto_install_rust_toolchain = false

    if enable_config('fail-on-warning')
      r.extra_rustflags = ["-Dwarnings"]
    end

    if enable_config('debug')
      r.profile = :dev
    end

    if enable_config('address-sanitizer')
      r.extra_rustflags = ["-Zsanitizer=address"]
    end

    # `rb_sys/mkmf` passes all arguments after `--` directly to `cargo rustc`.
    # We use this awful hack to keep compatibility with existing flags used by
    # the C implementation.
    trimmed_argv = ARGV.take_while { |arg| arg != "--" }
    ARGV = trimmed_argv
  end
else
  puts 'rustc not found, skipping Rust extension.'

  File.write('Makefile', dummy_makefile($srcdir).join(''))
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
prometheus-client-mmap-0.28.1 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.1-x86_64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.1-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.1-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.1-aarch64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.0 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.0-x86_64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.0-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.0-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.28.0-aarch64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.27.0 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.27.0-x86_64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.27.0-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.27.0-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.27.0-aarch64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.26.1 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.26.1-x86_64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.26.1-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.26.1-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-0.26.1-aarch64-linux ext/fast_mmaped_file_rs/extconf.rb