http://minikanren.org/ - MiniKanren, a different language in the same vein, small and embedded into lots of host languages.
https://microsoft.github.io/z3guide/docs/logic/intro/ - Z3, again a different language but hits many of the same areas and use cases along with plenty of others. Also usable as a library (probably how most people access it, often through Python).
Thanks, MiniKanren implemented in C and Lua seems like the right way.
SWI Prolog seems to use global state, which becomes no-no without using GILs and whatnot. Z3 I've use before in college, but it wasn't really a scripting tool, unless something changed in the meantime.