slige/runtime/main.cpp

15 lines
411 B
C++

#include "actions.hpp"
#include "json.hpp"
#include "rpc_server.hpp"
int main()
{
auto rpc = sliger::rpc::RpcServer(
[&](std::unique_ptr<sliger::json::Value> req,
std::unique_ptr<sliger::rpc::BufferedWriter> writer) {
auto action = sliger::rpc::action::action_from_json(std::move(req));
action->perform_action(std::move(writer));
});
rpc.listen();
}