Module: Jimmu::SQLite3FFI

Extended by:
Fiddle::Importer
Defined in:
lib/jimmu.rb

Overview

Minimal Fiddle-based binding to the system's libsqlite3. This avoids requiring the sqlite3 gem (and therefore avoids a native extension compile step) by calling directly into the SQLite C API that ships with the OS (Linux/macOS) or can be dropped in as a DLL (Windows).

Constant Summary collapse

LIB_CANDIDATES =
if Fiddle::WINDOWS
  %w[sqlite3.dll]
elsif RbConfig::CONFIG['host_os'] =~ /darwin/
  %w[libsqlite3.dylib /usr/lib/libsqlite3.dylib /opt/homebrew/lib/libsqlite3.dylib /usr/local/lib/libsqlite3.dylib]
else
  %w[libsqlite3.so.0 libsqlite3.so /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 /usr/lib/libsqlite3.so.0]
end.freeze
LOADED =
!loaded_lib.nil?