lib/ngt.rb in ngt-0.1.1 vs lib/ngt.rb in ngt-0.2.0

- old
+ new

@@ -1,18 +1,22 @@ # dependencies require "ffi" # modules +require "ngt/utils" require "ngt/index" +require "ngt/optimizer" require "ngt/version" module Ngt class Error < StandardError; end class << self attr_accessor :ffi_lib end - self.ffi_lib = ["ngt"] + lib_name = FFI.map_library_name("ngt") + vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__) + self.ffi_lib = [vendor_lib] # friendlier error message autoload :FFI, "ngt/ffi" end