KataGo icon indicating copy to clipboard operation
KataGo copied to clipboard

How to compile the engine to a dll so other language can call it?

Open mcguu opened this issue 4 years ago • 5 comments

If I use other language such as .net how to compile it to dll so a c# can call it?

mcguu avatar Sep 23 '21 07:09 mcguu

Instead of calling a dll, you can use C# to create a child process running the katago.exe

mega-optimus avatar Sep 23 '21 10:09 mega-optimus

Yes, just invoke KataGo as a separate process and use the analysis engine whose interface is fully documented here: https://github.com/lightvector/KataGo/blob/master/docs/Analysis_Engine.md

lightvector avatar Sep 23 '21 12:09 lightvector

@mega-optimus what about swift? in mac?

mcguu avatar Sep 24 '21 00:09 mcguu

@mcguu You can use Julia Lang if you have a time of ten days to learn it. By Julia, run and stop katago.exe are as easy as

cmd=`./katago.exe mode cfg model`
open(cmd) 
close(cmd)

HackYardo avatar Sep 29 '21 17:09 HackYardo

@mcguu san,

I think that Process in Foundation is for you.

y-ich avatar Sep 30 '21 00:09 y-ich