Exception: RbSys::CargoBuilder::DylibNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rb_sys/cargo_builder.rb

Overview

Error raised when no cdylib artifact was created

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ DylibNotFoundError

Returns a new instance of DylibNotFoundError.



342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/rb_sys/cargo_builder.rb', line 342

def initialize(dir)
  files = Dir.glob(File.join(dir, "**", "*")).map { |f| "- #{f}" }.join "\n"

  super <<~MSG
    Dynamic library not found for Rust extension (in #{dir})

    Make sure you set "crate-type" in Cargo.toml to "cdylib"

    Found files:
    #{files}
  MSG
end