Exception: RbSys::CargoBuilder::DylibNotFoundError Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Error raised when no cdylib artifact was created

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ DylibNotFoundError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DylibNotFoundError.



355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/rb_sys/cargo_builder.rb', line 355

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