I tried adding to sqlite3.nim the following:
proc load_extension*(para1: PSqlite3, para2:cstring): int32{.cdecl, mylib, importc: "sqlite3_load_extension".}
This code below seems to work now... but given my fairly limited knowledge, I appreciate any comments on whether this is the correct solution or if there is something not safe/correct with this approach.
import db_sqlite, sqlite3
let db = db_sqlite.open("test.db","","","")
echo load_extension(db,"/path/json1.so")
echo "Opened"
for x in db.fastRows(sql"""SELECT json('{"yes":"no"}')"""):
echo x
db_sqlite.close(db)
echo "Closed"