There is an old wrapper library for .NET for SWI Prolog foreign interface: GitHub - SWI-Prolog/contrib-swiplcs: Interface from C# to SWI-Prolog
I’ve updated it for version 9.x of SWI Prolog and ported it to .NET 6 and Visual Studio 2022
I intend it to use it with Godot 4.x.
If any one interested, source code is here: Алексей Косарчук / swipl-cs-2 · GitLab
Build is configurared for x64 architecture.