#ifndef LIBFURVM #include "furvm/context.hpp" #include "furvm/executor.hpp" #include "furvm/instruction.hpp" #include #include #include static constexpr std::array s_bytecode = { furvm::byte(furvm::instruction_t::PushB2I), 67, furvm::byte(furvm::instruction_t::Return), }; int main(void) { auto context = std::make_shared(); auto mainModule = context->emplace(s_bytecode.begin(), s_bytecode.end()); auto executor = furvm::executor::create(context); executor->push_frame(mainModule, 0); while ((executor->flags() & furvm::executor_flags::Done) != furvm::executor_flags::Done) { executor->step(); } return 0; } #endif // LUBFURVM