Sha256: 225884235ee8029227bc29a0aa565f20cce4597372c2c52e743562149f672a02

Contents?: true

Size: 766 Bytes

Versions: 72

Compression:

Stored size: 766 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
  raise 'rustc not found. prometheus-client-mmap now requires Rust.'
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
prometheus-client-mmap-1.1.2 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.1.2-x86_64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.1.2-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.1.2-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.1.2-aarch64-linux ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6-x86_64-linux-musl ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6-x86_64-linux-gnu ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6-aarch64-linux-musl ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.6-aarch64-linux-gnu ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5 ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5-x86_64-linux-musl ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5-x86_64-linux-gnu ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5-x86_64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5-arm64-darwin ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5-aarch64-linux-musl ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.5-aarch64-linux-gnu ext/fast_mmaped_file_rs/extconf.rb
prometheus-client-mmap-1.2.4 ext/fast_mmaped_file_rs/extconf.rb