#pragma once #include "vm.hpp" #include #include #include #include namespace sliger::rpc { class VmProvider { public: VmProvider() { } VmProvider(const VmProvider&) = delete; VmProvider operator=(const VmProvider&) = delete; VmProvider(VmProvider&&) = delete; VmProvider operator=(VmProvider&&) = delete; auto load_and_start(std::vector instructions) -> void; auto flame_graph_json() -> std::optional; auto code_coverage_json() -> std::optional; auto done() -> bool; private: void run_timeslot(); std::mutex mutex; std::optional vm; std::optional running_thread; }; }