Open flashpixx opened 2 months ago
There are several ways to do what you want to do. If the only thing you want to do in your microservice is executing Prolog terms, take a look at library(http/http_server), which is a HTTP(S) server which can be used from Prolog. It still has some rough edges, but it may work for you already. I have more samples of this library usage if you want to take this route.
The other way is using Scryer Prolog as a library. This is not documented yet but the methods available to you are under src/machine/lib_machine.rs
. Some people are already using them, like https://github.com/coasys
I will choose the 2nd option, because I would like to get a single executable later
Is there any documentation how to build terms and queries and execute then within code? For my use-case I would like to do:
Hello,
I'm interested in this project and I'm a Rust newby. I'm working on a project with network e.g. nmap results and I would like to build a microservice with Tokio / Axum to execute Prolog terms. Is it possible to use this project as a library dependency in my project. For my use case I need to read / parse a pl-file with static rules and append facts (terms) which I can build based on my NMAP results and I need to share this instance over multiple threads in Axum, so I get run some post and get HTTP queries (by converting JSON input into prolog terms).
I didn't find this in the documentation. Thanks a lot of helping